Quantcast

Forums | MacLife

You are not logged in.

#1 2009-01-22 6:50 pm

b_dubb
loch whatchamacallit
From: chapel hill, nc
Registered: 2002-11-19
Posts: 510
Website

image align bug in IE 7

www.rtphomesolutions.com

so i put an image on a web page and tried to get it to align right. 

Code:

<p><img src="image.jpg height="Y" width="X" align="right" /></p>

the page was initially XHTML but switched it to HTML transitional later.  i'll explain why in a second.

the code displayed fine in every browser except IE 7 and Camino 1.7(?).  the text wrapped to the left in all browsers except in IE 7 and Camino ... there was an image to the right and the text started under it.  to get the image to align in IE 7 and to get text to wrap to the left ... i wrapped the text in one <p> tag and inserted <br> where paragraphs ended/started. 

my question: WTF?  why is that suddenly aligning an image in IE 7 such a pain?  i tried wrapping the image in a div and floating it to the right ... no.  i even tried putting it in a table and aligning the table to the right.  there were a couple of other hacks that made the text display OVER the image - obviously not acceptable. 

i've been doing mostly web development (server side) for the past few years and haven't been that busy making image intensive sights.  i would think dropping an image in a <p> tag and setting the image to align right would have been enough. 

i should've been a dentist

b


"The Fates lead he who will; he who won't, they drag." - Seneca

Offline

 

#2 2009-01-22 10:47 pm

resedit
Chicken Little
Royal Wombat
From: /dev/null
Registered: 1999-11-01
Posts: 50393
Website

Re: image align bug in IE 7

try

Code:

<img src="image.src" height="y" width="y" style="float: right;" />

I don't believe align is a legal attribute to the img tag, in any version of xhtml (transitional or not) - use css for that.

Last edited by resedit (2009-01-22 10:48 pm)


In her right hand Jenny held the Bible of her mother
Jenny had a pistol in the other
-- Steve Taylor

Offline

 

#3 2009-01-22 10:52 pm

resedit
Chicken Little
Royal Wombat
From: /dev/null
Registered: 1999-11-01
Posts: 50393
Website

Re: image align bug in IE 7

Oh - if you want the text to start under it, after the image you can do -

Code:

<div style="clear: both;"></div>

That will force anything after it to float below and to the left.


In her right hand Jenny held the Bible of her mother
Jenny had a pistol in the other
-- Steve Taylor

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson