Is it possible to create markup as shown below?
Sample 1..................Right 1
Text2.....................Right Text 2
Another Text3.............Right 3
So far, I:
HTML:
<div class="left-most-div">Sample 1</div>
<div class="center-div"> </div>
<div class="right-most-div">Right 1</div>
<div class="clear"></div>
<div class="left-most-div">Text2</div>
<div class="center-div"> </div>
<div class="right-most-div">Right Text2</div>
<div class="clear"></div>
<div class="left-most-div">Another Text 3</div>
<div class="center-div"> </div>
<div class="right-most-div">Right 3</div>
CSS
.center_div {
border-bottom: 1px dotted #aaa;
}
.clear {
clear:both;
}
The center div has a flexible length, adjustable based on the size of the leftmost div. The right side of the div has a fixed left edge.
source
share