I am trying to have a div show an image on the left then text to the right of that image. So I float to divs next to each other, one to hold the image and one to hold the text. I then want the same exact setup underneathe it. The problem is the first div's work but when I add the second div underneathe the image in the second div shows directly under the text from the first div on the right then the text from the second div is pushed below the second image thats under the text and shows on the left. What am I doing wrong? Below is the code and here is the image showing how it looks:
And here is how I implement it on the page:Code:#main_content { padding:20px; padding-top:10px; } #main_content #main_image { float:left; width:200px; } #main_content #main_text { float:left; width:320px; font-size:11px; font-family:verdana; color:#000; line-height:16px; }
Code:<div id="main_image"><img border="0" src="images/reilly_hall.gif" height="130" width="190" style="border:1px #000 solid;"></div> <div id="main_text"><p><strong>Test title</strong></p> <p>Test text</p> </div> <div id="main_image"><img border="0" src="images/natatorium_field.gif" height="130" width="190" style="border:1px #000 solid;"></div> <div id="main_text"><p><strong>Test title</strong></p> <p>test text</p> </div>











Bookmarks