Jump to content
  • Advertisement
Sign in to follow this  
Wizard1988

[web] IE vs Firefox Positioning

This topic is 4075 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a layout and I am experiencing problems with positioning in Firefox. I have a column on the left side which contains an ul and it gets shifted to the right in FF. This does not happen in IE. I am also having issues with the horizontal navigation. In FF the links seem to be much lower than in IE. Does anyone know what I can do about these issues? Any comments, or suggestions are welcome. http://jg-webdesign.freehostia.com/work_directory/norridge_park/ Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Try setting padding:0; for your that ul element

Edit: The nav could be the same thing, set padding:0; for that ul also.

Share this post


Link to post
Share on other sites
Often, the easiest way to fix problems like this is to have two CSS scripts...one for IE, and one for other browsers. Like in IE, maybe it looks right when you have the padding set to 10px, but in firefox, it looks right when the padding is set to 0px. Using 2 different CSS pages you can have it both ways. This is sortof a pain in the ass to do all the time, but it's rather easy.

Using javascript you can tell which browser the user is using, and load the correct script...that will override classes and elements that need to be changed.

If you decide to go this route and have trouble with the javascript end, post back and someone will help you out.

ArchG

[Edited by - ArchG on July 25, 2007 4:05:01 PM]

Share this post


Link to post
Share on other sites
There are a few different approaches you can take when using different styles across browsers files:
> Have different CSS pages for browsers, as ArchG said.
> To minimize on repetition, have one main CSS page where everything's standard, and then have your sub-pages where it adjusts classes and such for the different browsers
> Use server side scripting, like PHP, to handle the differences for you.

All of these methods have their benefits and downfalls. Try them out and see which one fits your situation the best and easiest.

Share this post


Link to post
Share on other sites
javascript? PHP? Don't. You only need to distinguish IE v.s. non-IE browsers. Just create a nice cross-browser stylesheet and create an extra one that works around IE's buggy and non-compliant behaviour by overriding certain classes. Include the IE-specific stylesheet with conditional comments. It's the only fool-proof way of distinguishing IE from the rest, plus it's XHTML complient, uses no scripting and is forwards-compatible.

See http://www.quirksmode.org/css/condcom.html

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!