SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS percent widths not working in IE6

    Hi,

    I've been designing a site with xhtml 1.0 specs and have run into a problem. I've sorted everything else out pretty much except for this annoyance.

    I have a <div> and then another <div> inside. I assign the parent <div> to absolute and the child <div> to a certain percentage using width: x%

    Now in IE6, the child <div> decided to get its percentage width from the whole page width, not as a percentage of the parent <div>. I've tried this in IE5.5 and mozilla 1.1 (both of which display it correctly). The only problem I have is with IE6.

    So, could someone please indicate to me if I am doing something wrong, or if it's a bug in the browser. Also, if there is a work around or fix in my coding?

    Site: http://www16.brinkster.com/mhanline/resume.asp

    You will see how the middle content section forces a horizontal scrollbar in IE6 but not in other browsers.

    Thanks in advance,

    Mike

  2. #2
    SitePoint Zealot 19nine78's Avatar
    Join Date
    Feb 2002
    Location
    Ayr, scotland
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try:

    Code:
    .striphead {
     top: 20px;
     left: 0px;
     width: auto;
     height:40px;
     border-bottom: 2px solid #74748A;
     background-color: transparent;
    }
    That seems to fix it for me.

    cheers

    alastair


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
  •