Having trouble with CSS

My CCS is not being applied to my div class. Here is my CSS code ‘’’.Contact Information {
position: relative;
bottom: 100px;
text-align: center;
}’’’.

Here is the code for my HTML that I am trying to apply the CSS to. ‘’’

Contact Information

Phone: 516-450-7372  Email: plucien516@aol.com  Address: 8330 118th street   Kew Gardens NY  11415

'''

Please assist with helping me apply my CCS to the div class=“Contact Information”>

Please and thank you

You’ll need to wrap your code in triple back ticks so we can see it properly. The back tick is in the upper left corner of my keyboard, just above the Tab key. Put three back ticks on a line of their own above your code and then three back ticks on a line of their own below your code. It looks like you tried to do this but you used single quotes instead of back ticks.

My CCS is not being applied to my div class. Here is my CSS code

.Contact Information {
position: relative;
bottom: 100px;
text-align: center;
}

Here is the code for my HTML that I am trying to apply the CSS to.

<div class="Contact Information">

<section id="Contact Information"><h2>Contact Information</h2>

<p><b>Phone:</b> 516-450-7372 &nbsp;<b>Email:</b> plucien516@aol.com

&nbsp;<b>Address:</b> 8330 118th street&nbsp;

&nbsp;Kew Gardens NY&nbsp;

11415</P>

</div>

Please assist with helping me apply my CCS to the div class=“Contact Information”>

Please and thank you

Hi @Lucien516 ,

Class name can’t have spaces. When you have a space-separated string in your class attribute, you’re always giving your element several classes.

So an element like :

<div class="son father"></div>

will have the classes son and father .

2 Likes

Thanks I corrected, appreciate the input.

It worked ! Thanks a lot spark07

1 Like