Forum Moderators: not2easy

Message Too Old, No Replies

What does html> do (without the <)? in somefile.css

         

dbar

4:46 am on Jul 7, 2005 (gmt 0)

10+ Year Member



I'm learning/playing more with css and used an online generator which produced some of the following code but I don't get what the "html> stuff" does.

#centercontent { top:77px;
margin-left:99px;
margin-right:119px;
voice-family: inherit;
margin-left:175px;
margin-right:121px;
}

html>
body #centercontent { margin-left:175px;
margin-right:121px;
}

-----------
Also, what are the different uses between these two (# vs .):

#banner {
stuff here
}

AND

.banner {
stuff here
}

Thanks.

David

Robin_reala

8:05 am on Jul 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The > selector selects a child of the element. In this case body is always a child of html, so this selector is being used to serve rules to browsers other that IE - IE currently doesn't understand the child selector.

tedster

8:12 am on Jul 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For the last part of your question, a class (indicated by the dot .) can be applied to an indefinite number of elements on any given page. But an id (indicated by the hash mark #) is to be applied only once, to one element only, on any given page.

dbar

3:26 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



thanks!