www.webdeveloper.com
Results 1 to 3 of 3

Thread: varying DIV sizes...help!!!

  1. #1
    Join Date
    Dec 2002
    Posts
    2

    varying DIV sizes...help!!!

    I have a page that contains several DIV tags. I use absolute positioning to control their visibility. My problem is that the page defaults to the size of the largest DIV. This results in whitespace at the end of DIVs that are shorter than the longest DIV. I would like for the page length to vary with the size of my DIV.

    Can someone please explain how to accomplish this and/or point me in the right direction?

    TIA
    Bill

  2. #2
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    Am I correct in believing you want to hide/show DIVs so that when they are not visible they do not take up page space? If so, you can use "display: none" to remove a DIV from the page's flow, so it doesn't take up any space, and "dispay: inline" or "display: block" to show it again. You can also set the element.style.display property using JavaScript.

    If I have misinterpreted what you want, please post code or a URL so I can see the problem.

    Adam

  3. #3
    Join Date
    Dec 2002
    Posts
    2

    awesome Adam

    That is exactly what I needed. Much thanks for the quick response.

    Bill

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