www.webdeveloper.com
Results 1 to 7 of 7

Thread: horizontal div won't expand on ie 6

  1. #1
    Join Date
    Oct 2006
    Posts
    203

    horizontal div won't expand on ie 6

    Is there a fix for this:

    Code:
    #banner {
    background-color: #000000;
    background: #000 url (images/spacer.gif) repeat-x;
    text-align: left;
    position: absolute;
    right: 0;
    left: 0;
    height: 34px;
    padding: 0px;
    margin: 0px;
    }
    It expands no matter how big you make your bowser (horizontally) fine on FF3/2 and IE7 but not IE 6....any ideas?

    TY

  2. #2
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    Try width: 100%;

  3. #3
    Join Date
    Oct 2006
    Posts
    203
    Thanks but ie 6 still doesn't flinch.


    .....that makes ie 7 and ff work better though

    Here what I have in the html:

    Code:
    <div id="banner">
    <img src="images/header.gif" width="771" height="34" alt="" /><br />
    </div>
    Last edited by riskmod; 07-10-2008 at 10:42 AM.

  4. #4
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Could be a position:absolute problem I guess.

  5. #5
    Join Date
    Oct 2006
    Posts
    203
    yeah I just need some sort of solution on it

  6. #6
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    When absolutely positioning it is best to specify both an x and y coordinate so browsers don't have to guess. IE6 won't respond to stretching by specifying both left and right positions, so along with the 100% width, specify the left and top positions and remove the right. I question whether the absolute positioning is necessary anyway - using the default static position the div will expand to full available width naturally.

  7. #7
    Join Date
    Oct 2006
    Posts
    203
    thanks Cent

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles