SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Min-height in IE

    Is there a way to make the min-height code work for IE? If it was already covered in a past post, please give me a link.

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

    Ie treats height as min-height anyway.

    Set a container with 300px height and then add more content to it.

    IE will expand and Mozilla will overflow.

    Or did you mean something else?

    Paul

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by tempus
    Is there a way to make the min-height code work for IE? If it was already covered in a past post, please give me a link.
    Min-height works in IE6, but only on table cells confused: ). Try this code if you're using it on something other than a <td>:
    Code:
    #myDiv {
      height: 300px;
    }
    html>body #myDiv {
      /*min-height override for CSS2 browsers*/
      height: auto;
      min-height: 300px;
    }

  4. #4
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry I wasn't clear enough. I'm working on this site and if you look on the "contact Us" page you'll see the box doesn't go all the way down to the footer. Then look at the "About Us" page and you'll see it streches down past the normal height. This is the affect I want to achieve. I want the text box to start below the nav and stretch all the way to the footer, but have the ability to expand the box if necessary without overflowing.

  5. #5
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Code:
    #myDiv {
      height: 300px;
    }
    html>body #myDiv {
      /*min-height override for CSS2 browsers*/
      height: auto;
      min-height: 300px;
    }
    Your code seems to achieve the desired effect, except that in IE when the box is expanded, it adds extra space between the bottom 1px black border of the text box and the footer.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,555
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    except that in IE when the box is expanded, it adds extra space between the bottom 1px black border of the text box and the footer
    Do you have an example of what you mean? I put a height on your text element and the space between the border and footer was consistent with your existing page.

    Paul


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
  •