Hi Nikos,

Try positioning the a tag to the absolute top right corner of the heading 
block instead. Here's how that's done:

h1 {
position:relative;
}

h1 a {
position:absolute;
top:0;
right:0;
}

Of course if your heading is long or your page is narrow then the two 
headings may run into each other. If that's a problem then perhaps try 
giving the a tag an em width then limit the width of the main heading with a 
right padding like this:

h1 {
position:relative;
margin-right:11em;
}

h1 a {
position:absolute;
top:0;
right:0;
width:10em;
}

You may have to fiddle with the widths to get it to look right. I hope that 
helps.


- Matt =)


Matthew James Taylor
http://matthewjamestaylor.com


> Hi,
>
> the html is this :
>
> <h1>Title <a>subtitle</a></h1>
>
> I want the Title to be left aligned and the <a>subtitle</a> to right
> aligned. But I want them to be in the same line.
>
> When I float: right the <a> it goes to the right but it falls below the
> line. So I need to put a negative margin to get it to the same line with
> the "Title".
> This works in FF and IE
>
> In Opera and Safari doesn't work. If I remove the negative margin it
> works fine with just the float: right;
>
> Can anybody help?
>
> Nikos Mavros

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to