Forum Moderators: not2easy

Message Too Old, No Replies

# in CSS

         

malcolmcroucher

9:05 am on Oct 28, 2007 (gmt 0)

10+ Year Member



#Disclaimer {
bottom : 0px
position : absolute
text-align : center
width : 550px
}

What does the hash do?

it connects?

penders

11:09 am on Oct 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The hash (#) is an ID selector [w3.org]. In other words, in your case, it will match any HTML element that has id="Disclaimer", such as:

<div id="Disclaimer"> 
Blah blah...
</div>

The ID of an element should only occur once in a document - it should be unique. So there will only be one occurance of

id="Disclaimer"
.

It is good practise to always use lowercase ID/Class names. Since it is case-sensitive, "Disclaimer" is different to "disclaimer".

malcolmcroucher

11:16 am on Oct 28, 2007 (gmt 0)

10+ Year Member



i found the answer it is using classes .
if anyone has good lessons on classes please add them.

malcolmcroucher

3:17 pm on Oct 28, 2007 (gmt 0)

10+ Year Member



thanks

Marshall

4:24 pm on Oct 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You may want to check the W3C tutorials [w3schools.com]. Also, if what you posted is an example of existing code, there needs to be a semi-colon after each line:


#Disclaimer {
bottom : 0px ;
position : absolute ;
text-align : center ;
width : 550px ;
}

Marshall