I'm trying to display an address right aligned in the footer of my page like this:
1234 south east Main St. Nowhere, ID 45445 (555) 555-5555
in my markup I have this:
<address> 1234 south east Main St. Nowhere, Id 45445 (555) 555-5555 </address>
How can I get this to layout properly without inserting <br /> in each line using css?
When the text in a single table cell exceeds a few words, a line break (<BR>) may improve the appearance and readability of the table. The line break code allows data to be split into multiple lines. Place the line break code <BR> within the text at the point(s) you want the line to break.
We use the word–break property in CSS that is used to specify how a word should be broken or split when reaching the end of a line. The word–wrap property is used to split/break long words and wrap them into the next line.
hey try to use this use this
.address
{
white-space:pre;
text-align:right;
}
You're going to have to add extra elements in there, either <br>
as you suggest, or else something like:
<address>
<div class="street">1234 south east Main St.</div>
<div class="state">Nowhere, Id 45445</div>
<div class="telnum">(555) 555-5555</div>
</address>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With