By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Forcing width in IE

P: n/a
Hi all

I've got a problem which might be something to do with the IE box model bug,
but unless I've misunderstood it doesn't seem to fit the description of the
common problem.

I'm using HTML 4.01 Strict and CSS2, and I've stripped down the pages I'm
working on to show the basic problem.

If you look at
http://rnetworks2002.users.btopenwor...t/boxlong.html you'll see
some content inside a box, nested inside another. I want the outer box to
extend from the absolute position set by its top left corner to the right
hand side of the screen, regardless of screen size. I can test this in IE6,
NN6, and Opera 7.1, and it works OK with screen widths of 800 and 1024
pixels.

But if the content of the inner box is short, NN6 and Opera 7.1 still do
what I want, but IE6 renders both boxes so as to not extend to the
right-hand side. See
http://rnetworks2002.users.btopenwor.../boxshort.html

Can anyone point me to a solution / fix / hack for this? I've tried
everything I can think of, like setting width and/or min-width, but things
either don't work at all or they push the width beyond the right-hand side
and need horizontal scrollbars, which I *don't want. The height doesn't
matter, and I'm not bothered about older browsers, as they'll be taken care
of in other ways.

TIA for any help.
--
Tony T
Replace 'from' with 'to' (twice) for e-mail






Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Tony T" <fr*************@btinternet.com> wrote in message
news:bv**********@sparta.btinternet.com...
Hi all

I've got a problem which might be something to do with the IE box model bug, but unless I've misunderstood it doesn't seem to fit the description of the common problem.

I'm using HTML 4.01 Strict and CSS2, and I've stripped down the pages I'm
working on to show the basic problem.

If you look at
http://rnetworks2002.users.btopenwor...t/boxlong.html you'll see
some content inside a box, nested inside another. I want the outer box to
extend from the absolute position set by its top left corner to the right
hand side of the screen, regardless of screen size. I can test this in IE6, NN6, and Opera 7.1, and it works OK with screen widths of 800 and 1024
pixels.

But if the content of the inner box is short, NN6 and Opera 7.1 still do
what I want, but IE6 renders both boxes so as to not extend to the
right-hand side. See
http://rnetworks2002.users.btopenwor.../boxshort.html

Can anyone point me to a solution / fix / hack for this? I've tried
everything I can think of, like setting width and/or min-width, but things
either don't work at all or they push the width beyond the right-hand side
and need horizontal scrollbars, which I *don't want. The height doesn't
matter, and I'm not bothered about older browsers, as they'll be taken care of in other ways.

TIA for any help.
--
Tony T
Replace 'from' with 'to' (twice) for e-mail


Sorry - I should have posted the url for the stylesheet. It's

http://rnetworks2002.users.btopenwor...st/boxtest.css
--
Tony T
Replace 'from' with 'to' (twice) for e-mail
Jul 20 '05 #2

P: n/a
On Wed, 4 Feb 2004 18:52:38 +0000 (UTC), "Tony T"
<fr*************@btinternet.com> wrote:

[...]
But if the content of the inner box is short, NN6 and Opera 7.1 still do
what I want, but IE6 renders both boxes so as to not extend to the
right-hand side. See
http://rnetworks2002.users.btopenwor.../boxshort.html


I don't understand why this happens, but I also don't understand why you
use absolute positioning. If you change the styling for the outer div to

#centerwrap {
margin: 76px 0 0 165px;
background-color: #f2c4bf;
}

you achieve the same visual effect (and this works for IE as well).

HTH,
Gertjan.

--
Gertjan Klein <gk****@xs4all.nl>
Jul 20 '05 #3

P: n/a

"Gertjan Klein" <gk****@xs4all.nl> wrote in message
news:aa********************************@4ax.com...
On Wed, 4 Feb 2004 18:52:38 +0000 (UTC), "Tony T"
<fr*************@btinternet.com> wrote:

[...]
But if the content of the inner box is short, NN6 and Opera 7.1 still do
what I want, but IE6 renders both boxes so as to not extend to the
right-hand side. See
http://rnetworks2002.users.btopenwor.../boxshort.html


I don't understand why this happens, but I also don't understand why you
use absolute positioning. If you change the styling for the outer div to

#centerwrap {
margin: 76px 0 0 165px;
background-color: #f2c4bf;
}

you achieve the same visual effect (and this works for IE as well).

HTH,
Gertjan.

--
Gertjan Klein <gk****@xs4all.nl>


Thanks Gertjan - this seems to work fine. You're right, on reflection I
don't need the position:absolute to put this div where it needs to be.

Still don't know why it breaks down with position:absolute in IE6, though.
Have I discovered my very own unreported bug??

Can anyone tell me how IE5 handles it?

PS - sorry for the slow response - I've been away for a few days.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.