Results 1 to 5 of 5

Thread: Relative width in IE

  1. #1
    Join Date
    Jun 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Relative width in IE

    Hello All,

    I've searched at quite a few places but I couldn't find the answer yet, and I hope you can help me! I'm currently coding the new site for the Dutch World of Warcraft Fansite and I'm trying to get the banner in the center 100% of the TD width. Firefox handles this great, but IE totally ignores the class and uses the original width, while it dóes use the new height!

    CSS class:
    Code:
    .picture {
    width: 100%;
    height: 200px;
    }
    HTML:
    Code:
    <img id="r1" src="img/nieuws/laden.png" alt="" border="0" width="100%" class="picture">
    I did find a few things regarding IE being different, but is there a way to work around this?

    Rando
    Last edited by Snookerman; 06-22-2009 at 02:05 PM.

  2. #2
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    Have you tried removing the width="" attribute in the <IMG>? Because you haven't put a height attribute, and that may be why the height works.

    Hope this helps,
    X96
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  3. #3
    Join Date
    Jun 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the answer!

    Sadly, even after removing the width="" tag, Internet Explorer still ignores the tag!

    Anymore suggestions?

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Have you tried margin:auto; on the cell?

    or is there more stuff in the cell you don't want centered?

  5. #5
    Join Date
    Jun 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That did the trick, many thanks!

    This is the result;
    http://www.wow-nl.com/beta

    The matter was about the rotating pictures in the middle

    Thanks,

    Rando

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •