Automatic DIV Height

B

Bryan

Hello all,

I'm filling an empty div with html code using innerHTML. Right now I'm
bordering the div using the CSS border property and I'm setting the div
with a hard coded height using the CSS height property. However, I
would like to have the height of the div be automatically fit to the
data displayed inside of it. If I leave the height property out of the
CSS declaration for the div, then the bottom of the div border is right
below the top of the div border and all of the data set using innerHTML
ends up below the border.

How can I make it so that the div height automatically fits the data
inside of it set by innerHTML?

Thanks in advance!
 
R

Randy Webb

Bryan said the following on 11/19/2006 7:36 PM:

Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Just wanted to bump this back up...

"bump this back up" to where?
does anyone know how to do this?!

What does a CSS question have to do with JS?

But, just for giggles, what happens when you hard code the HTML in the
page and view it? Make it work that way and then script it to your delights.
 
B

Bryan

Sorry, just now realized this is the wrong area to ask the question.

Thanks for the advise anyway!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top