Jump to content
xisto Community
Sign in to follow this  
moldboy

Css So Only Ie Will Understand It

Recommended Posts

I have a site that lloks great in FireFox, but there are a few things that need to be tweaked in IE. I've seen a bunch of sites that have done something with toeir code to make it work with IE. Is there a way I can make FireFox ignore this line {position:relative; left:3px;}?

Share this post


Link to post
Share on other sites

heres a hack that fixes ie and leavs all browsers normal (suposedly, but im having my doubts with opera):

/* Fix IE. Hide from IE Mac \*/* html div#tools_menu {text-align:right !important;}/* End */

* Is used to select all elements of the current level, but apparently, only Ie believes that theres an invisible element surrounding the root element (html) so the only browser that will read this as valid css is IE, and the coment lines before it work this way:

\ is used to scape a character so the browser doesnt take it as normal code but a chain of text, so its suposed to scape the * so the browser will believe that the next lines are still a comment, so this: \*/ is not actually a comment end for the current rule, its suposed to fix ie for mac, but im not totally sure i made some tests and some things work and somethings didnt, any way im not totally sure but it does work for ie 6 at least:D

Share this post


Link to post
Share on other sites

On another thread here at the trap, Tyssen warns that the presentation of html in IE is the suspect in a lot of cases.
In order to have the most widely acceptable code, he reccomends developing your site in Firefox and then inserting IE hacks. Most tutorials I have read at really good sites(ie: positioniseverything dot com, alistapart dot com) make the same point.
You are trying to go the other way around and it will be more difficult to get firefox to 'mis-behave' since it is a standards compliant browser.

Edited by jlhaslip (see edit history)

Share this post


Link to post
Share on other sites

I don't know what you all mean about develop for FF and trick IE later, and then tell me that that isn't what I'm doing. Because to the best of my knowledge that is what I'm doing, cause my site works exactly how I want it to in FireFox, but there is an image that is 3 pixels to the left in IE and I simply want it to display the same in IE as it already does in FireFox. That sounds to me like I'm developing for FireFox and trying to trick IE. Anyway thanks to Lozbo I will try that and post back with the results. *** edit --- added the following line --- edit ***Thanks a lot Lozbo, that worked, at least for the time being.

Notice from jlhaslip:
editted as requested
Edited by jlhaslip (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.