I have the following structure:
Which I want displayed like (so the first spans in each div are a set width and the second spans are aligned):
Trouble is, when you resize the browser, I dont want this:
I want this:
At the moment I'm using this code:
Which works OK, but the second span overflows to the next line and there is a scroll bar at the bottom of the window because the margin of the second span is of the page.
Any thoughts appreciated.
Jon
Code:
<div>
<span class="colone">Some text:<span>
<span class="coltwo">more text related to the text on the left.</span>
</div>
<div>
<span class="colone">Some text2:<span>
<span class="coltwo">more text related to the text on the left2.</span>
</div>
Which I want displayed like (so the first spans in each div are a set width and the second spans are aligned):
Code:
Some text: more text related to the text on the left.
Some text2: more text related to the text on the left2.
Trouble is, when you resize the browser, I dont want this:
Code:
Some text: more text related
to the text on the left.
Some text2: more text related
to the text on the left2.
I want this:
Code:
Some text: more text related
to the text on the
left.
Some text2: more text related
to the text on the
left2.
At the moment I'm using this code:
Code:
span.colone {margin-right: -10em; padding: 0 10em 0 1em; width: 100%;}
span.coltwo {width: 10em; vertical-align: top;}
Which works OK, but the second span overflows to the next line and there is a scroll bar at the bottom of the window because the margin of the second span is of the page.
Any thoughts appreciated.
Jon