I've created a web page and external css that work in IE, but what do I need to get them to work in Firefox?

Recommended Answers

All 4 Replies

Post your code here, let us see.

Design with Firefox first. Then fix the bugs in the IE version.

Never put size styles (width, height) and surrounding styles (margin, border, padding) on the same tag or in the same stylesheet style. If you do, IE will render them differently than any other browser does.

Instead, nest two tags, putting the size styles on one and the surrounding styles on the other. Then all browsers will render them the same.

Note that IE renders font characters one pixel wider than FF does, but reduces the space between characters by 1 pixel.

If you use tables, define the vertical alignment. IE and FF have different defaults.

I second MidiMagic, work and test everything in Firefox first, then fix the bugs that IE creates. To target IE with its own css use this:

<html>
  <head>
    <!-- Meta tags, title, etc. goes in here -->
    <link rel="stylesheet" href="default.css" type="text/css" /> <!-- Normal stylesheet -->
    <!--[if lte IE 7]>
      <link rel="stylesheet" type="text/css" href="default_ie7.css" /><!-- Stylesheet which targets IE 7 or less -->
    <![endif]-->
  </head>
  <body>
    <!-- Content goes in here -->
  </body>
</html>

its the other way around

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.