Reputation: 11107
Say I have the following text input:
Essen Oxland Road, 34, LS4 7Du Leeds, United Kingdom
How can I style to appear as:
Upvotes: 0
Views: 111
Reputation: 54714
Use display:inline-block
with vertical-align:middle
HTML
<span class="left">
Essen
</span>
<span class="right">
Oxland Road, 34, LS4 7Du<br>
Leeds, United Kingdom
</span>
CSS
span.left, span.right {
display: inline-block;
vertical-align: middle;
}
Note that display:inline-block
does not work properly in IE7 and lower.
Upvotes: 3
Reputation: 9552
.left {
float:left;
line-height: 2.0;
}
<span class="left">
Essen
</span>
<span>
Oxland Road, 34, LS4 7Du<br>
Leeds, United Kingdom
</span>
Upvotes: 0