Results 1 to 2 of 2

Thread: fixed and variable div heights

  1. #1
    Join Date
    Aug 2004

    fixed and variable div heights

    i want a div to resize its height when the browser is resized but also want the div to be 100 pixels from the top and i want the bottom edge to be 40 pixels from the bottom. i know that you can define the hight as a percentage but this will not work in this case because the 100 and 40 are not percentages

  2. #2
    Join Date
    Jun 2003
    position: absolute;
    top: 100px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    <div class=inmiddle>some content and stuff</div>

    if that doesn't work(which I doubt for IE) then you'll have to turn to Javascript...
    EDIT: I though I might try this:
    <div style="position: absolute; top: 0px; bottom: 0px; height: 100%; padding-top: 100px; padding-bottom: 50px;">
    Last edited by scragar; 03-16-2005 at 05:02 AM.
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

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