So here it is:
*:first-child+html {}
But conditional comments are still better.
# June 28, 2007 1:51 PM
Jeff L said:
That's more than is needed - this will work as well:
*+html { }
where the * = your doctype.
# June 28, 2007 2:56 PM
Brisbane Web Design said:
thanks for the post, very useful.
# June 28, 2007 11:41 PM
PostGinger said:
Useful posts, thanks!
Any chance you could expand on the "where * = your doctype"?
I've never seen a doctype selector in CSS or did I miss something?
# June 29, 2007 5:36 AM
CSS Guy said:
@PostGinger:
I don't think Jeff means you have to type out your doctype. Instead, the selector works if your html has a doctype specified. Leave it as a "*".
# June 29, 2007 7:34 AM
JD Graffam said:
the shorter * hack is very nice. I agree, not good for development but great for when you are in a hurry!
# June 30, 2007 1:17 PM
Nemanja Cosovic said:
Don't get it, I know for this:
* html body 'nameOfTheClassOrIdInQuestion' { somestuff: -10px; meLovezMargins: 200px; ect: none; }
But where dose the IE7 understands what class or id he needs to "understand"?
# July 6, 2007 5:49 AM
Gaspar said:
I dont like to use, but sometimes i have to use it.
Whem a project is all wrong since the beginning i would not lose manny time in try to get a better way.
So i use this list of hack for all browsers... http://www.solidstategroup.com/page/1592
# July 9, 2007 4:28 AM
Yash said:
Great info..Thank you searching for such one
# August 16, 2007 3:22 AM
Name:
Human? What is the last letter of the alphabet? (required):
Email Address:
URL:
Comments: (Caution: HTML is allowed, so watch your <'s and >'s)
About this site.Get the feed.
Send questions, including links or code, to askthecssguy@gmail.com.
This entry was posted Jun 28, 2007. Previous Entry | Next Entry Home | Archives
©2008 AskTheCSSGuy.com
Comments (8)
Jeff L said:
That's more than is needed - this will work as well:
*+html { }
where the * = your doctype.
# June 28, 2007 2:56 PM
Brisbane Web Design said:
thanks for the post, very useful.
# June 28, 2007 11:41 PM
PostGinger said:
Useful posts, thanks!
Any chance you could expand on the "where * = your doctype"?
I've never seen a doctype selector in CSS or did I miss something?
# June 29, 2007 5:36 AM
CSS Guy said:
@PostGinger:
I don't think Jeff means you have to type out your doctype. Instead, the selector works if your html has a doctype specified. Leave it as a "*".
# June 29, 2007 7:34 AM
JD Graffam said:
the shorter * hack is very nice. I agree, not good for development but great for when you are in a hurry!
# June 30, 2007 1:17 PM
Nemanja Cosovic said:
Don't get it, I know for this:
* html body 'nameOfTheClassOrIdInQuestion'
{
somestuff: -10px;
meLovezMargins: 200px;
ect: none;
}
But where dose the IE7 understands what class or id he needs to "understand"?
# July 6, 2007 5:49 AM
Gaspar said:
I dont like to use, but sometimes i have to use it.
Whem a project is all wrong since the beginning i would not lose manny time in try to get a better way.
So i use this list of hack for all browsers...
http://www.solidstategroup.com/page/1592
# July 9, 2007 4:28 AM
Yash said:
Great info..Thank you
searching for such one
# August 16, 2007 3:22 AM