CSS problem wrapping text around image in non-floated div container -
here's scenario. #main_content div contains #nav_leftsidebar div (floated left) navigation links, #bottom_leftsidebar div (floated left) stacked below #nav_leftsidebar (by clearing float left) other info/links, , #page_content div (no float) right of both #nav_leftsidebar div , #bottom_leftsidebar div.
i trying wrap text around image in top left corner of page_content div, when float: left image, image drops below text , aligns left of #bottom_leftsidebar div.
css code:
#main_container { width: 983px; margin: 0 auto; padding: 5px 0 0 0; } #nav_leftsidebar { float: left; width: 250px; padding: 5px 10px 0 0; margin: 5px 0 0 0; border-right-style: solid; border-right-width: 1px; border-right-color: #c0c0c0; } #bottom_leftsidebar { float: left; clear: left; width: 250px; padding: 5px 10px 0 0; border-right-style: solid; border-right-width: 1px; border-right-color: #c0c0c0; } #page_content { position: relative; width: 950px; margin: 5px 0 0 10px; left: 10px; }
html code:
<div id="nav_leftsidebar"> <ul class="nav_sidebar"> <li> items ... </li> </ul> </div> <div id="bottom_leftsidebar" style="height: 200px"> bottom_leftsidebar div </div> <div id="page_content"> <h1>network design</h1> <img id="img1" alt="" src="~/images/it_networkdesign.jpg" style="float: left; margin: 0px 5px 5px 0px" runat="server" /> <p> content ... </p> </div>
how can postion image in top left corner of #page_content div , wrap text around right & bottom sides of image well? or direction appreciated ...
wrap 2 sidebars inside "page content" div. consider placing image inside <p>
tag. here's mean:
<div id="page_content"> <div id="nav_leftsidebar"> <ul class="nav_sidebar"> <li> items ... </li> </ul> </div> <div id="bottom_leftsidebar" style="height: 200px"> bottom_leftsidebar div </div> <h1>network design</h1> <p><img id="img1" alt="" src="~/images/it_networkdesign.jpg" style="float: left; margin: 0px 5px 5px 0px" runat="server" /> content ... </p> </div>
Comments
Post a Comment