January 7, 201016 yr I cant work out whats happening here Theres supposed to a bg color behind the text I loose it went I float my text ?? tia Jack <div id="content2top"><!--roundedcornertop--></div> <div id="content2"><!--this one has the bg colour--> <div class="leftsc"><!--left text--> </div> <div class="rightsc"><!--right text--> </div> </div> <div id="content2bottom"><!--roundedcornerbottom--></div>
January 7, 201016 yr Add this style:- .clear { clear: both; width: 100%; height: 0; visibility: hidden; } and add the clear div into the markup before the closing tag of the #content2 container:- ...........be.</p> </div> <div class="clear">& nbsp;</div><!--added clear div (no space between & and nbsp;--> </div> <div id="content2bottom"></div> </div><!--end middle--> The floated divs have no height, so the #content2 container doesn't know where to add the background. Adding an unfloated invisible div with no height after the floated divs makes the #content2 take the background down to it. Edit: your #content2bottom div which has no content should do the same thing if you move it above the </div> tag into the #content2 div.
January 7, 201016 yr Author thanks Wickham much appreciated also that reminded me to put into the 2 empty divs I'm getting there slowly lol
Create an account or sign in to comment