IE image align

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi Folks,

I had a div which was say 100px wide, with images in the following

1) 80px wide
2) 120px wide
3) 120px wide

What I'm finding in IE (6) is that the 80px image aligns to the left.
Even if I change text-align or set right they both appear to align the
image to the left rather than to the right (which is what I wanted).

The fudge fix is use

html>body .rightbar

to fix it so IEs width is wider in the pre html> section.

Is there an easier way or better way to do this? Also is there a way
without using VMware/VPC to run/test IE7 and IE6 at the same time?



Re: IE image align

UKuser wrote:

Quoted text here. Click to load it

Hi A

It just so happens I was searching for a way to have older versions of
Internet Explorer on my PC last week and I believe Tredosoft is what
you're looking for - specifically The
site has standalone versions of IE from 3 upwards to download which you
can install whilst still having 7 as your main embedded browser. I've
only had them on a few days but I've not come across any real issues
with them so far. I think there are a few minor niggles with some of
them but it should give you what you're looking for and there's plenty
of info on the forum bit of the Tredosoft site.

Hope that helps.

Grant - Driffield, UK

Re: IE image align

Quoted text here. Click to load it

excellent find! thanks for the link


Paul watt

Re: IE image align

Hi Grant,

Thanks for the link - a very good program!

A wrote:
Quoted text here. Click to load it

Re: IE image align

Quoted text here. Click to load it

I have no such issues with the Multiple_IE from tredosoft, conditional
comments work just as they should.

BootNic   Tuesday, January 02, 2007 4:04 PM

All my humor is based upon destruction and despair. If the whole
world was tranquil, without disease and violence, I'd be standing on
the breadline right in back of J. Edgar Hoover.
*Lenny Bruce US comedian, satirist, author*

Re: IE image align

UKuser wrote:
Quoted text here. Click to load it

How to you propose to align to the right a 120 pixel image within a 100
pixels wide container? Also text-align is not the way I would do it, but
make the images blocks and adjust the margins. Where is an example with
the container DIV larger that images:

             " ">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Right Aligned Images</title>
<style type="text/css">
DIV.rightbar {
   width: 200px; background-color: yellow; /* demo bacground color */
DIV.rightbar IMG {
   display: block; margin-left: auto; margin-right: 0;

<div class="rightbar">
   <img src="x.jpg" width="80" height="10" alt="narrow">
   <img src="x.jpg" width="120" height="10" alt="wide">
   <img src="x.jpg" width="120" height="10" alt="wide">

Works *even* in IE!

Take care,


Re: IE image align

Quoted text here. Click to load it

Presumably it should line up on the right and overflow to the left.

That can be achieved by setting direction: rtl on the container (which
also causes text-align to default to right). Firefox gets it wrong

Re: IE image align

Ben C wrote:
Quoted text here. Click to load it

But technically all he wants is to align to the right his content, not
the direction of his language flow

Take care,


Site Timeline