html - Two columns, elements within the two columns stacked using css -


i have searched everywhere answer, don't think i'm asking question in right way. have 2 columns, need elements stack , cant seem make work. want add background color make elements stand out.

<style type="text/css"> #showcase {     width: 100%;     margin-bottom: 20px;     margin-top: 4px;     vertical-align:top; }     #showcase > div {         width: 280px;         float: left;         border: 1px solid #ddd;         padding: 5px;         vertical-align:top;         margin-left: 0px;     }         #showcase > div:first-child {             margin-left: 0;             vertical-align:top;         }         #showcase > div > div {              float: right;             margin-left: 8px;             vertical-align:top;             font: 12px arial, sans-serif;         }         #showcase > div > img:last-child {             width: 150px;             clear: both;             margin-top:16px;             margin-left:0px;             vertical-align:top;         } img.floatleft {  float: left;  margin: 4px;  } img.floatright {  float: right;  margin: 4px;  }  </style>   <div class="module" style="margin-top:0px;"> <div class="module-header"><h3>product spotlight</h3></div> </div> <div id="showcase">    <? while($row = mysql_fetch_array($products_showcase_query)): ?>      <div>         <span style="display: block;font-size:20px;line-height:        130%;margin-bottom:4px;"><?=              $row['product_headline'] ?></span>           <img src="../product_images/<?= $row['product_image'] ?>" style="width: 134px; float: left;" />          <div><div class="floatleft">             <?= $row['product_summary'] ?>         </div></div>          <img src="../product_logos/<?= $row['product_logo'] ?>" />      </div>  <? endwhile ?> <span style="display: block;clear:both;"></span>     </div> 

layout example

any appreciated! thank :)


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -