Forum Moderators: open

Message Too Old, No Replies

Alignment of <Hx> Tag

         

onlineleben

8:44 pm on Apr 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,
I want ot split a headline into two lines. Normaly no problem as I can use a regular <br> tag to divide the headline.
What I want to do is that the 1st line is left aligned and the 2nd line is aligned to the right.
Any tips on how to do that? I don't want to have an empty line between these two lines of the headline and I want to keep it in plain old HTML.
Also I dont want to mess around with &nbsp;

Any help is very much appreciated.
Many thanks in advance.

g1smd

9:34 pm on Apr 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would use a two row, two column <table>, with two <hx> tags, and two empty cells (must have a minimum of "&nbsp;" in the cells). This might not be the best way, but is probably the easiest to code and the most browser compatible.

<edit>ISP connection dropped while writing this, and then locked me out for nearly an hour</edit>

pageoneresults

10:16 pm on Apr 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



h1.left{margin:0px;text-align:left;}
h1.right{margin:0px;text-align:right;}

<h1 class="left">Left Heading</h1>
<h1 class="right>Right Heading</h1>

I'm not too sure I'd recommend stacking <h> tags like that. I've never attempted it, but it just isn't proper html in my mind.