I have this series of outer <div> elements used to create a nice rounded edge border look but once I add a float element inside then the outer <div> elements act as if nothing is there. I understand that the parent <div> is supposed to ignore any float. My question is how to make the outer <div> fit to the size of the inner float <div>
Here is a sample:
Thanks in advance for any help.Code:***CSS File*** .b {background: url(images-jpgs/dot.jpg) 0 100% repeat-x} .l {background: url(images-jpgs/dot.jpg) 0 0 repeat-y} .r {background: url(images-jpgs/dot.jpg) 100% 0 repeat-y} .t {background: url(images-jpgs/dot.jpg) 0 0 repeat-x;} .bl {background: url(images-jpgs/bl.jpg) 0 100% no-repeat} .br {background: url(images-jpgs/br.jpg) 100% 100% no-repeat} .tl {background: url(images-jpgs/tl.jpg) 0 0 no-repeat} .tr {background: url(images-jpgs/tr.jpg) 100% 0 no-repeat; padding:10px;} *** HTML File *** <div style="float:left;margin:3% 0% 0% 30%;width:30%;"> <div class="t"><div class="b"><div class="l"><div class="r"> <div class="bl"><div class="br"><div class="tl"><div class="tr"> <div style="float:left;margin:2% 0% 0% 5%;"> BlahBlahBlahBlah BlahBlahBlahBlah BlahBlahBlahBlah </div> </div></div></div></div></div></div></div></div> </div>



Reply With Quote

Bookmarks