473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Making height variable according to content of page

Hello friends, I traped at one point while developing my project. I am making a site using CSS but one problem is come that is I cant able to make height of the page variable according to the content of the page.
Please help me to out of this problem.
Sep 13 '07 #1
2 1305
Atli
5,058 Expert 4TB
Hi. Welcome to TSDN!

You have posted your question in the Articles section rather than the Forum section.
I have moved it across for you.

Moderator
Sep 14 '07 #2
The easiest way to do this is to simply not set the height and enclose all content within a DIV. The height will be automatically calculated in most cases and you don't have to worry.

For example:

Expand|Select|Wrap|Line Numbers
  1. <div style="border:1px #000000 solid;">
  2. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  3. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  4. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  5. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  6. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  7. </div>
  8.  
will display a box around all the content with the appropriate height while

Expand|Select|Wrap|Line Numbers
  1. <div style="border:1px #000000 solid;">
  2. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  3. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  4. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  5. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  6. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  7. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  8. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  9. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  10. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  11. <p>ajdfjafjasldjfa;sjdfajfasdfasjflajsfljasdfkjdsf</p>
  12. </div>
  13.  
will also automatically adjust.

This particular problem has nailed me more than once and has always come down to me defining too much in the stylesheet.
Sep 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: |-|erc | last post by:
Hi! Small challenge for you. The index.php uses this file and calls layout(). Take a look at www.chatty.net this file draws the chat login box on the right. I traced the CHAT button it submits...
2
by: Stan Brown | last post by:
I'm taking the liberty of reposting the query I posted five days ago. I hope that it just got overlooked because it was in the middle of a thread. Sample page:...
15
by: Garmt de Vries | last post by:
I would have guessed that this issue had been discussed to death, but I couldn't find an answer to my problem in the ciwas archives. So, at the risk of asking something trivial, here goes: I...
6
by: Don Sutter | last post by:
Hi all, I'm using Javascript to try to determine the final height of a division so that I can use that value in calculations to set the height of another division and also my body height. I'm...
3
by: Byron | last post by:
Hi, Javascript confuses me, so I usually limit myself to Dreamweaver's built-in scripts for stuff like imageswaps. But this time I'm trying to write something very simple myself. I do most of my...
22
by: Les Juby | last post by:
I am trying to adjust the window/table size of a website (www.worklaw.co.za) which has made use of DIV tags with its settings embedded in an CSS file. The client wants its width and height to...
1
by: davidr | last post by:
Hi, I am using Divs with CSS to setup a layout for a site. I am using the <Div>s and style sheets below. I want the TopMenu to go across the entire top of the browser. It does go across the...
1
by: Teelions | last post by:
I know that this can be done for iframes but am wondering if it can be also done for layers. I have 2 pages: an asp content page that has a html (toc.html) include placed within it. The...
7
by: Rabel | last post by:
I am having trouble getting an image in my design to stretch correctly with the main content. Here is a link http://creativeness.com/temptest/test9.html Now the image on the left below the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.