Jump to content

[SOLVED] Question about CSS and IE


rh-penguin

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.

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.