| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Valid CSS Hack for IE?; Amazing | |
|---|---|
| Tweet Topic Started: Jun 13 2005, 11:24 AM (496 Views) | |
| JoeC | Jun 13 2005, 11:24 AM Post #1 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Ever made a website, viewing it in FireFox as your default browser, only to find that when you view it in IE, everything looks totally bodged? Or vice versa? You still want W3C validity for your CSS and (X)HTML, but you don't want to spend six hours trying to tweak your site to provide a sub-standard version which displays in the major browsers. Well, Do Not Fear! I don't know how many other people know this, but in your CSS, if you put " * html " before a selector, only IE interprets it as a selector. For example...
Will show a black page with white text in Mozilla, Netscape, etc, but a white with black text on it in IE. And you can even validate it against the W3C (X)HTML Validator and the W3C CSS Validator and it'll come out VALID in both cases. Aaaah, a job well done
|
![]() |
|
| solinent | Jun 13 2005, 11:48 AM Post #2 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
REALLY!!!! OMFG~~!!!!! I spent all of 10 minutes creating serverside scripting to do that lol
|
![]() |
|
| Gornakle | Jun 13 2005, 11:49 AM Post #3 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You could also use:
IE will use the 22px width, all other browsers the 20px width. |
![]() |
|
| JoeC | Jun 13 2005, 12:12 PM Post #4 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yeah well...I've had the problem several times, and I can't do ServerSide scripting Just starting to learn PHP and SQL as it is.
|
![]() |
|
| Dennis | Jun 13 2005, 12:37 PM Post #5 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Whoa. Nice trick. Thanks Joe. |
![]() |
|
| JoeC | Jun 13 2005, 03:59 PM Post #6 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You see, sol, Gorn, someone appreciates me taking a minute to post it
|
![]() |
|
| Gornakle | Jun 13 2005, 04:49 PM Post #7 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Alright.. alright.. W00h! OMG that rockz!! You rule Joezif!! :w00t: .. happy now?
|
![]() |
|
| JoeC | Jun 13 2005, 05:47 PM Post #8 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Very
|
![]() |
|
| solinent | Jun 13 2005, 08:39 PM Post #9 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
YEAH!!! GO joeseifh!(I am BAD at spelling) i was complementing you before, just that 10 minutes is reall alot to me :/ :geek: |
![]() |
|
| JoeC | Jun 13 2005, 08:48 PM Post #10 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Oh, right. Sorry, I assumed it was sarcasm ![]() Oh, and Gorn, FF recognises ! important too. |
![]() |
|
| solinent | Jun 13 2005, 08:49 PM Post #11 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
Lol Firefox is getting smarter. I hope firefox doensn't adapt the * html thing cause then we're all gonna have to resort to SERVER SIDE scripting!!!! It's the apocalypse!!!(sarcastic there ;)) |
![]() |
|
| Gornakle | Jun 14 2005, 10:51 AM Post #12 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
It does, but IE doesn't (properly). In the following case:
Firefox (and other browsers) use the 20px width because that was marked !important. IE uses the 22px width, ignoring !important. |
![]() |
|
| solinent | Jun 15 2005, 01:51 PM Post #13 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
Stupid IE <_< |
![]() |
|
| kragnerac | Jun 15 2005, 03:49 PM Post #14 |
|
Member
![]() ![]() ![]()
|
Stupid Avant... <_< |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
11:29 AM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)



lol
11:29 AM Jul 11