views:

36

answers:

3

How to you define a row in div tags

High level example in pseudo code:

[DIV TAGS LEFT]  [DIV TAGS CENTER] [DIV TAGS RIGHT]

[WHAT GOES HERE?????]

[DIV TAGS LEFT]  [DIV TAGS CENTER] [DIV TAGS RIGHT]

[WHAT GOES HERE?????]

[DIV TAGS LEFT]  [DIV TAGS CENTER] [DIV TAGS RIGHT]
+1  A: 
<div class="parent">
  <div class="left">left</div>
  <div class="center">center</div>
  <div class="right">right</div>
</div>

styling:

.parent {
  overflow: auto;
}

.parent>div {
  float: left;
  width: 33%;
}

This should give you what your looking for.

Ben Rowe
+1  A: 

If I understand the question, you need this HTML structure:

<div class="row">
   <div class="left"></div><div class="center"></div><div class="right"></div>
</div>

... and this CSS:

div.row {
  clear:both;
}
John Drummond
+1  A: 

this may work

<style>
.parent {
    margin-bottom: 15px;
    padding: 10px;
    color: #0A416B;
    clear:both;
}
.left, .center, .right{
    float:left;
    width:32%;
    border:1px solid #CEDCEA; 
    padding:5px;

}
</style>


<div class="parent">
    <div class="left">
        Left
    </div>
    <div class="center">
        center
    </div>
    <div class="right">
        right
    </div>
    <div style="clear:both;"></div>
</div>
kamal