CSS Q
- Started
- Last post
- 6 Responses
- toastie
Hiii everybody!
I am having a bit of a CSS prob and wondering if anyone can help. I have a div that has two floating divs side by side in it. I want one of the divs to scale to the size of the other one automatically. I made it 100% height, so that as the parent div is scaled by one of the children, the other one will fill to 100%.. now that works dandy in IE but in firefox it doesnt seem to work at all.. if anyone could point me in the right direction, i would be eternally grateful.
- weestu0
this might be of use:
- nocomply0
I believe to get heights to be recognized in FF you need to style your HTML tag to be height:100%.
- toastie0
hmm in either case its the same problem: the fact that in FF, the child div doesnt seem to define the size of the parent one.
- heavyt0
let's see the code.
TR1
- spiralstarez0
It would help more if you could post an example.
Heights are tricky in CSS. You can get widths to inherit from the parent quite easily, but heights are a different story.
I've used Javascript before to change it onLoad on the body tag:
// get the parent element height
parentElement = document.getElementByID('element...
ChildElement = document.getElementByID('element... = parentElement + 'px';
- jakeyj0
faux columns is the way to go