IE image align

U

UKuser

Hi Folks,

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

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
{
width:100px;
}

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?

Thanks

A
 
I

info

UKuser said:
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?

Thanks

A

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 www.tredosoft.com/Multiple_IE. 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
 
P

Paul Watt

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 www.tredosoft.com/Multiple_IE. 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

excellent find! thanks for the link
 
J

Jonathan N. Little

UKuser said:
Hi Folks,

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

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).

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:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<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;
}
</style>

</head>
<body>

<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">
</div>
</body>
</html>


Works *even* in IE!
 
B

Ben C

How to you propose to align to the right a 120 pixel image within a 100
pixels wide container?

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
though.
 
T

Toby Inkster

info said:
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 www.tredosoft.com/Multiple_IE.

Note that after installing multiple versions of IE, you may find that
there are certain other oddities -- conditional comments don't work
correctly (they will always assume that the IE version is that of the
"main" copy).

See http://www.positioniseverything.net/articles/multiIE.html for more
info.
 
J

Jonathan N. Little

Ben said:
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
though.

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

BootNic

Toby Inkster said:
news: (e-mail address removed)5n.co.uk


Note that after installing multiple versions of IE, you may find that
there are certain other oddities -- conditional comments don't work
correctly (they will always assume that the IE version is that of the
"main" copy).

See http://www.positioniseverything.net/articles/multiIE.html for more
info.

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*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top