#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    York, UK
    Posts
    62
    Rep Power
    11

    CSS - specifying height adds width in IE


    Hi there

    Has anyone encountered a bug in IE (6) of extra width, when applying css height property to a div?

    I set the width of div, via margin
    Code:
    div#footer {
      margin: 0px 9%;
      height: 40px;
    }
    When height is specified, the width of the footer is 1px bigger on either side, then other elements with same margin, but no height.

    This does not happen in other (gecko) browsers!

    Anyone know a solution, (tantek won't be precise enough with %)
    ??
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Stratford-upon-Avon, UK
    Posts
    66
    Rep Power
    11
    Hi

    Just putting two div's like this on a page in IE 6 shows the same widths:

    <div style="margin: 0px 9%; height: 40px; background-color:#cfc;">hello1</div>
    <div style="margin: 0px 9%; background-color:#cff;">hello2</div>

    So, can you give a URL for an example? If the css is in a file, put a link to the css too in your post.




    Trevor
    "Good artists copy, great artists steal." Pablo Picasso

IMN logo majestic logo threadwatch logo seochat tools logo