Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jul 2004
    Posts
    8
    Member #
    6605
    I can't seem to figure out how to make my content div a minimum height while also automatically expanding when lots of content is present. Does anyone have any ideas on how this might be accomplished?

    For example, I would like the height of the div to vertically fill an 800x600 screen res, even if there is only a sentence or two of content.

    I have been trying to figure this out, via searching this site, google, and other places, and have yet to find a solution.

    Regards,
    PowerSlave

  2.  

  3. #2
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    Hi,

    The way I've currently got things setup on my own site is by not applying a height attrbite to the content <div>, allowing the text to decide the general length.

    In browsers that support standards I use a combination of min-height: / max-height: to get the content area to format properly. However Internet Explorer doesn't support this method.

    If your layout doesn't require pixel precision you could attach afew <br />'s to the end to knock the size up in IE and control it with applying overflow controls to the <body>.

    Well that's a rough suggestion, someone might be able to help give a better answer.

  4. #3
    Junior Member
    Join Date
    Jul 2004
    Posts
    8
    Member #
    6605
    I thought about doing just that, but the container div doesn't seem to expand to the height of the menu div, which is located inside. The container div will, however, expand to the height of the content div.

    In other words, I have a container div with a menu div and a content div, but the container div only expands based on the height of the content div. I don't understand why it is ignoring the menu div, and this is why I wanted to set a minimum div height for content.

    Ugh, please tell me you understand what I mean plz.

    Regards,
    PowrSlave

  5. #4
    Junior Member
    Join Date
    Jul 2004
    Posts
    8
    Member #
    6605
    Okay, setting the min-height property of the content div works perfectly in gecko browsers, but doesn't work in that putrid pile of crap known as IE. Any other ideas?

  6. #5
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Well, theoretically there is a minimum-height attribute, but IE ignores this.

    The solution: create a normal expanding div, put in a an image that is 1px wide, and Xpx high (your minimum height) and float it left/right (using align property) of your text. The div will expand to the image, but also fit text if need be.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  7. #6
    Junior Member
    Join Date
    Jul 2004
    Posts
    8
    Member #
    6605
    wow a long spacer image. Great idea. Not the most elegant, but it will do for now. Thanks!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:29 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com