Skip navigation
Currently Being Moderated

Special coding for Internet Explorer

Apr 25, 2011 2:25 PM

We are modifying a website that was constructed in 2007 using Dreamweaver.  In a .css file containing code for external stylesheets, there are numerous instances of double-coding, based upon brower type-one set of code for IE and another for “other browsers”.  The following is an example:


#mainCont1  /* other browsers */ {

float: left;

max-width: 600px;



min-height: 650px;



*html #mainCont1  /* for IE */ {

float: left;

width: 598px;



height: 650px;




The .css and .html code currently supplied by Dreamweaver when creating  a new page does not contain duplicate code for IE.  Is there still a reason to code differently for Internet Explorer? 


The only reference to variations in browsers when creating a new file in Dreamweaver is the following code in the .css file:


ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */

padding: 0;

margin: 0;



Would adding this code eliminate the need for double coding in css for  “other browsers" and then for IE as was done in 2007?


  • Currently Being Moderated
    Jul 26, 2011 3:40 PM   in reply to madcityjrc

    What i can tell about my experience, these are known as "css hacks". If your page code its ok and you page its well build there is no need of this tricks, but sometimes new versions of browsers are "buggy" like IE and you have to help them with this hacks so they show correctly. It happens to me all the time that pages look correctly on firefox for example and different on IE, I dont know why they added the "compatibility mode" button it just get worst.


    this happens to me often when using dynamic content with javascript scripts.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points