homepage Welcome to WebmasterWorld Guest from 23.21.34.188
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

    
using the * universal selector
*, body
nyteshade




msg:4382065
 1:43 pm on Nov 1, 2011 (gmt 0)

I recently discovered some CSS that will fill the viewport with the current document at boagworld. It's this:
*, body {
margin: 0; padding: 0;
}

#container {
display: block;
position: absolute;
min-height: 100%;
}

#content {
display: block;
margin-bottom: 3em;
}

#footer {
position: absolute;
display: block;
bottom: 0;
height: 3em
}


I understand everything here execpt the " *, body "? I mean, if you use * then it selects all elements including body right? Then why include body, it's not a descendant as used here, right? Also, wouldn't html* accomplish the same thing?
I've got a decent handle on CSS but the symbols leave me scratching my head sometimes. Thx all.

 

topr8




msg:4382072
 2:00 pm on Nov 1, 2011 (gmt 0)

* means everything,

the body in the first line of code is superfluous

nyteshade




msg:4382082
 2:14 pm on Nov 1, 2011 (gmt 0)

I thought as much, but I needed to do a brain-check, thanks!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved