Jump to content

Recommended Posts

Can someone please tell me if there is a way of having different css for IE and FF in the same css file, for the same div? (Opera too maybe)

 

I have a navigation bar which in IE gets displayed a bit higher and a bit more to the right then it should be. Maybe there is some other way to fix this?; Any fix would help really :D.......

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/49231-solved-question-about-css-and-ie/
Share on other sites

I'm still fairly new to programming, but have monkeyed around with css a little. To me it would be easier to seperate the files out so they are specific to the browser and then use browser detection  with if else function to reference to the correct css sheet. That way if you want to make a change you go to the browser you want to change and change it instead of working your way through all of the code that is intermixed. I think it would be a little laborious to work through using the css divs-i think you could potentially do it with if functions, but all individually and would take longer in my opinion.

Ye i guess i could do that. The only downside to that is, sometimes the browser maybe not be detected correctlly or detected at all. Its a good idea and ill keep that in mind, thanks!

 

Anyone else think of something different?

Solve browser-specific issues by conditional CSS if you can't code to make appearances identical(ish).

I found an article which suggests something like this:
.ie .example {
background-color: yellow;
}

But it dont seem to work...... can you see anything wrong in that code?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.