Results 1 to 5 of 5

Thread: CSS Height

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    CSS Height

    I have a layout that has 2 columns.

    -----------------------------------
    | 111111 | 222222222222222222 |
    | 111111 | 222222222222222222 |
    | 111111 | 222222222222222222 |
    | 111111 | 222222222222222222 |
    -----------------------------------

    Section 2 on some sections of the site goes on for several pages, section 1 has only a navigation menu in it. Is there a way to make the size of 1 the same as 2. I would like to make the height of 1 the same size as 2 dynamically. How can this be done?

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: CSS Height

    I am always running into this issue, AFAIK you can't, but usually if you think about it a bit you find you don't need to anyway.

    What is the effect that requires they be the same height? Certain to be an alternative method.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    Re: CSS Height

    I have a scroller with quick links(anchors) on it so that finding info on a page will be easier, but it seems to hide once I get past the navigation menu area in section 1. it just seems weird to me, and I though that if I can set the height of section 1 to the height of section 2 that it would resolve the problem.

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: CSS Height

    Can you post a screenshot of how it looks at the moment?

  5. #5
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: CSS Height

    Most often the easiest method is to wrap both inside another element and set a background to that element. As the parent element is sized according to the inner elements, it'll always fill all space available.

    As offtopic: this behaviour in CSS is something I personally consider a flaw. It should be possible to make elements fill all available vertical space. But it isn't possible, atleast not at the moment, thus we just have to work around the problem.

Posting Permissions

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



Click Here to Expand Forum to Full Width