Div tags, how to create lines with them

How to define a string 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]
+5
source share
3 answers

it can 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>
+6
source

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;
}
+4
source
<div class="parent">
  <div class="left">left</div>
  <div class="center">center</div>
  <div class="right">right</div>
</div>

style:

.parent {
  overflow: auto;
}

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

This should give you what you are looking for.

+2
source

All Articles