Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<h2> heading tag positioning wrong in FF & Opera 1

Status
Not open for further replies.

1DMF

Programmer
Joined
Jan 18, 2005
Messages
8,795
Location
GB
I have added an image to the page and then used a BG image on the <h2> tag, everything looks great in IE but FF & Opera is correctly aligning the text next to the floated image but not the BG image.

how do i make the <h2> tag position relative to the floated image?

here is a link for reference....


I know I could simply apply float right to the first <h2> and everything is fine, is this the correct fix?

thanks 1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
For the first H2, you could give it a style of "margin-left: 120px;" to fix the issue... try playing with values (should be the width of the img?)

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
why does it line up the text correctly but not the BG image relative to the left hand image.

It correctly lines up both in IE7 ?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
that was spot on dan, 120px on the nose!

still think this was one case where IE7 was slightly more intelligent than the other browsers, maybe not compliant, but more intelligent!

I'd expect to have to add the margin to move the text as well as the image in the case of Opera/FF but then that wouldn't give you the text/image wrap around effect.

Oh well all sorted now

Regards,

1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top