3 replies [Last post]
SRangelDE
Offline
newbie
Germany
Last seen: 14 years 13 weeks ago
Germany
Timezone: GMT+1
Joined: 2005-05-24
Posts: 2
Points: 0

Hi, can someone tell me what an asterix followed by 'html' does exactly. I couldn't find anything in Google. :roll:
Thanks!

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 year 5 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

* html - What is it?

The * is a universal selector, ie it selects everything. This is useful for zeroing margins and padding on all elements.

The * html is a hack to target Internet Explorer.

IE is the only browser that sees HTML as a descendant of the *. Seeing as the outermost tag in a html document is <html>, you can't go higher than that. Example:

<p> </p>

p b {this style targets the b descendant of p}

Hopefully this makes sense.

Verschwindende wrote:
  • CSS doesn't make pies

SRangelDE
Offline
newbie
Germany
Last seen: 14 years 13 weeks ago
Germany
Timezone: GMT+1
Joined: 2005-05-24
Posts: 2
Points: 0

* html - What is it?

Sure does - thanks!

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 year 5 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

* html - What is it?

Good.

To override styles use something like this:

* html #container p
{
}

This will only affect IE.

Verschwindende wrote:
  • CSS doesn't make pies