SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Australia
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE6 doesn't show div height

    Hi All,

    My page is starting to look good in Firefox, however, IE6 will only show a div background color to the height of the content. So if the div is 100px high and there is only 20px of content, then the div will only appear 20px content.

    I have searched around trying to find how people use spacers to make the background tile down and show 100px high but I have had no luck finding how to do it.

    Can anyone help me out?

    Brad.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,535
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You'll have to show us what you are doing as what you are saying doesn't hold true

    If you specify 200px height then thats how high your background will be.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style>
    #outer{
     width:200px;
     height:200px;
     background:red;
    }
    </style>
    </head>
    <body>
    <div id="outer">hello</div>
    </body>
    </html>
    So I think you may mean some other issue. You don't need spacers in css.

    You can repeat a background image down the height of a container as long as the container has height.

    We'll need to see what you are doing.

    Paul

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Australia
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's odd...there must be a bug in my code as I have a column that will not stretch to the proper height that I define.

    Thanks for replying Paul.

    Brad.

    EDIT: Sorry...I was trying to use min-height but I now realise IE6 doesn't recognise that and I have to set height for it to work.
    How do you avoid issues of the user changing the font size and there being issues with overflow of text?

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,535
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    How do you avoid issues of the user changing the font size and there being issues with overflow of text?
    You just have to try your best to accomodate it. Sizing things in ems so that they expand together is the usual way to do it.

    I usually try to accomodate all ies text sizing but I'm ot worried if theres the odd overlap at largest and smallet sizes as long as its legible.

    Paul

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Australia
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul,

    I really appreciate your input on this one.

    Brad.


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
  •