Results 1 to 9 of 9

Thread: Variable height in CSS

  1. #1
    Join Date
    May 2008
    Posts
    30

    Variable height in CSS

    I sit and write a website and irritates me a little over a height of my hand.
    I have 3 boxes which constitute the main elements on the page.
    A top, middle and bottom. Top is set to take a specific height and bottom equally.

    My problem is with the middle part, it must be variable height so the page is filled out if there is not enough content or that the visitor has a very high resolution.

    The site is set to 100% and when I have 2 boxes with a specified height of course I can not enter the center, to fill 100% since then very much bulkier than it should.

    I can say that the code is written with tables and Altitude conducted in CSS with a lot of DIVs

    Can I enter a middle variable height in CSS or should use javascript?

  2. #2
    Join Date
    May 2008
    Posts
    2,012
    If the middle part must have variable height, you can not just fail to specify a height at all - or what ...?

  3. #3
    Join Date
    May 2008
    Posts
    30
    Nope. Does the same result. I must state height.

    I have since indicated to be 100% and I had not the 2 boxes are filled so I could throw a 100% of my content box and everything would be good. But because the design is the top and bottom must be specified in fixed size.

  4. #4
    Join Date
    May 2008
    Posts
    2,012
    Okay, I think I misunderstood the question a bit.
    You want the page to fill the entire screen, but if the content is wider, the height follow.

    Have you tried to set the height to 100%, then you've ensured that it does not work that way?

    If it is not possible to put the middle div tag to the desired, you will not, however, javascript. You can set it up in a simple table (but it seems like you do not feel like the solution?)

  5. #5
    Join Date
    Jan 2008
    Posts
    1,521
    The solution is a table or JavaScript. If you need to use JavaScript to get one's design to 'go up', is a design error;

    The technology is simply not equipped for the kind of designs.

  6. #6
    Join Date
    May 2008
    Posts
    30
    Hehe, you well said it. I think I will look again and see if I can make a workaround.

    I'll throw an answer so you get some points

  7. #7
    Join Date
    May 2008
    Posts
    30
    Hip Hip Hurray.

    If you try to use the small gray to what they intended to manage it so.

    Make a wrap on it all with big image of 100%, lower then the 2 beams which are in fixed height to position: absolute, then it is

    My design is now with variable height ....

  8. #8
    Join Date
    Jan 2008
    Posts
    1,521
    Managed?!

    Can you explain a bit more how you did?

  9. #9
    Join Date
    May 2008
    Posts
    2,012
    Yes, if you can accept that the content is lost during the lower box at the 'overflow, it is not hard to find a solution. What I took for granted, however, was not a solution

Similar Threads

  1. How to know height of row in Excel?
    By Dipanwita in forum Windows Software
    Replies: 2
    Last Post: 04-01-2012, 07:19 PM
  2. Replies: 2
    Last Post: 28-08-2009, 07:51 PM
  3. MAX width and max height of a image using css
    By Rutajit in forum Software Development
    Replies: 2
    Last Post: 22-05-2009, 07:30 PM
  4. Replies: 3
    Last Post: 25-04-2009, 11:34 AM
  5. Bug in the Iframe height related to IE8
    By Janhavi4U in forum Windows Software
    Replies: 4
    Last Post: 30-01-2009, 11:27 PM

Tags for this Thread

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
  •  
Page generated in 1,713,909,835.95453 seconds with 17 queries