Page 1 of 1

Cloning height

Posted: Wed Jul 16, 2008 12:03 am
by diggz
Hello,

I am having a problem resizing a few of my elements. I have an element that holds and image and and element that holds content. I would like the image the resize to the same size as the element that holds the content. Both elements are coded in CSS but i cannot figure out a way to get the image to resize the to the same size as the content area.

There is no way to put the content area and the image area into a single div tag as they are both loaded dynamically from a template. Is there anyway in the css to tell it to use the same height as the content area?

At the moment on the content area there is only a min-height tag and no tag from the actual height of the content box because it is dynamic and depends on the amount of content that is being displayed.

Thanks

Re: Cloning height

Posted: Wed Jul 16, 2008 12:16 am
by omniuni
try giving the image "width: 100%; height: 100%;" and see what happens.

Good Luck!

-Omni

Re: Cloning height

Posted: Wed Jul 16, 2008 9:49 am
by pickle
If the width & height are set in CSS, then just setting the height should automatically resize the width accordingly (at least in modern browsers).

Re: Cloning height

Posted: Mon Jul 21, 2008 2:10 pm
by JAB Creations
It sounds like your content isn't clearing it's parent element. Try using the overflow property on the parent element. For ancient browser support throw a br element at the bottom, it's messy but works.