Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default minium height in div

    is it possible to have a minium height in a div but it will go bigger if needed?

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  2. #2
    Join Date
    Apr 2006
    Location
    West Midlands
    Posts
    3,384
    Tokens
    0

    Latest Awards:

    Default

    Yep, its pretty simple.

    Just use CSS's "min-height" feature.

    In a style sheet it would be like

    HTML Code:
    div {
    min-height: 10px;
    }
    or without a style sheet:

    HTML Code:
    <div style="min-height: 10px;">Content.</div>
    You can also use this feature with percentages for instance if you wanted a div to be at least 10% of the page .
    Last edited by Josh-H; 24-12-2007 at 03:27 PM.


    Xbox Live: Jholder112233
    PS3 Online Tag: Josh-H

    Last.fm | Digg | Xbox.com

  3. #3
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    Excellent +rep

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  4. #4
    Join Date
    Jul 2005
    Posts
    1,653
    Tokens
    50

    Latest Awards:

    Default

    I'm not 100% sure if it works in IE without a width set, and you might need to add overflow: auto;

  5. #5
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    i ended up not needing this anyway because i changed the navi.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


Posting Permissions

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