Do you have a question? Post it now! No Registration Necessary. Now with pictures!
October 3, 2006, 4:36 pm
rate this thread
actually updating a page that someone else designed to be more
specific). I have one div nested inside another. Both have height set
to auto in the css. The inside div has the height of it's text. I
want the outside (container) div to have the height of the child, but I
can't get it to work that way. For example in my style.css I have:
border: solid 2px black;
then in my html file I have included the style.css and I have this in
*******Lots of text************
When it displays, the picture_frame_Joseph div is the correct height,
but the bodyJoseph div is just a small box. It should be at least the
size of the picture_frame_Joseph div. Any suggestions?
Re: CSS problem
Move the position: absolute, left and top properties from
picture_frame_Joseph to bodyJoseph.
At the moment, picture_frame_Joseph is "in the normal flow", but
bodyJoseph isn't. The height of its normal-flow descendents is zero
which is why it has zero height.
So position the frame instead, and have the picture as a normal-flow
child of the frame.
Re: CSS problem
Then read a CSS tutorial or textbook.
Then you need to read another textbook, too, and practice with some CSS of
your own. Working with someone else's CSS code is much tougher than writing
good CSS from the start.
It's clueless. There's probably no idea in trying to fix the design, so
don't bother posting the URL, which would in principle make it possible to
help you with it. Just leave it aside. When you know HTML and CSS well, you
might redesign the site, if it has a good purpose and useful content.
Jukka K. Korpela ("Yucca")