Page 1 of 1

CSS Hacks

Posted: Wed 22. Aug 2007, 11:12
by update
Wile looking for a special Safari hack I found these Browser hacks and collected them from the web - all valid CSS
Will eventually not work in updated browsers, but mostly will work though for now

Code: Select all

Safari only
	body:first-of-type {}
	body:first-of-type #eydiv {text-align:left;}

IE 6 and below
	* html {}

IE 7 and below
	*:first-child+html {} * html {}
	*:first-child+html #eydiv  {text-align:left;} * html #eydiv  {text-align:left;}

IE 7 only
	*:first-child+html {}
	*:first-child+html #eydiv .eyclass {text-align:left;}

IE 7 and modern browsers only
	html>body {}
	html>body #eydiv {text-align:left;}

Modern browsers only (not IE 7)
	html>/**/body {}
	html>/**/body #eydiv {text-align:left;}

Recent Opera versions 9 and below
	html:first-child {}
	html:first-child #eydiv {textt-align:left;} 
eydiv and eyclass are examples only :wink:

claus

Posted: Wed 22. Aug 2007, 12:10
by nekket
Claus: thank you - that's a very helpfull list...

Posted: Wed 22. Aug 2007, 13:12
by schmidtjr
Nice one.
I've got another usefull listing regarding Browser bugs and how to 'solve' them.
The only disadvantage for some users is, that it is in german :(

Here's the link
http://www.traum-projekt.com/forum/sitemap/t-93718.html



Sorry, didn't find Forum rules at the moment. If it's not allowed to post links to other forums, please delete this post.