|
Posted by gg on 06/07/06 01:44
Thanks dorayme
gg
dorayme wrote:
> In article
> <1149561269.323761.198100@g10g2000cwb.googlegroups.com>,
> "gg" <googlegroups@lycos.com> wrote:
>
> > I have this CSS snippet from a website, whose style I like. However
> > there are few things that I do not understand. Here is the snippet,
> > most attributes are removed for the sake of simplicity.
> >
> > body { margin: 0px; padding: 0px;
> > color: #000000;
> > }
> >
> > html body { margin:0; padding:0; }
> >
> > * html body { font: normal 8.5pt Verdana,Arial,sans-serif; }
> >
> > My queries:
> >
> > 1. Because the body is always going to be in <html>, what is implied by
> > these statements?
> > 2. What does * mean here, there is no * tag
>
>
> If you go
>
> body p {background: red}
>
> this means all paragraphs in the body (which may have a different
> background colour) will be red.
>
> * is a universal selector and might be used like this:
>
> * {margin: 0;}
>
> to make everything have no margin unless you later specified such
> for particular selectors.
>
> If the wildcard is put before html, it implies there is a higher
> root than html. But this is normally without any sense.
>
> * html body sounds like an instruction to Internet Explorer only.
>
> There is a peculiarity in IE that makes it "seem to understand"
> there is a higher element than HTML when in fact there is not.
> This peculiarity is often used to tell IE something that is
> ignored by other browsers. IE needs to be told a lot of things as
> it behaves in ways that surprise and disappoints folk trying to
> keep to the W3C recommended standards.
>
> Take a look, if you want, at say
> http://www.informit.com/articles/article.asp?p=358552&rl=1 for a
> start.
>
> --
> dorayme
Navigation:
[Reply to this message]
|