SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    different nested percentage width div in IE6

    Hi,

    It would be great if you could help with the following problem...

    I have a content div with a percentage width. Inside this div is another div - lets call it page-content, which also has a percentage width. The width of this div is much larger in IE6 than in Firefox / IE7. It seems as though in IE6 the page-cont div is taking its width as a percentage of the body, rather than taking a percentage of the parent div.

    Hope you can help!

    Cheers,
    Mike

  2. #2
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did a quick nested percentage widths divs and it worked the same in IE6 as in FF. Would probably need to see the full page code or link to the site - there may be something else affecting this.

  3. #3
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Here it is

    Hi,

    Many thanks for taking the time to respond. Here is the link to the site:

    http://www.nicelectrical.com/

  4. #4
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    One more thing...

    You will need to resize the window to ~<1000px to view the effect, as I have used a width.expression() fix to give the content region a max-size in IE6 and earlier.

    Cheers

  5. #5
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the auto in the expression needs to be the percentage width :
    Code:
    width:expression(document.body.clientWidth > 1100? "809px": "77&#37;" );
    You also have a missing "-<!-" on the conditional comment part involving IE6, causing that stylesheet to load up in everything.

  6. #6
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    That did the trick!

    Hey thanks for that.

    All ready to go!


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
  •