SearchSearch   

IE6: 1% is more than 1/100 body width?

 
   Webmaster Forums (Home) -> HTML RSS
Next:  Change a flash on the fly.  
Author Message
Michael

External


Since: Aug 10, 2007
Posts: 4



(Msg. 1) Posted: Fri Aug 10, 2007 4:02 pm
Post subject: IE6: 1% is more than 1/100 body width?
Archived from groups: alt>html (more info?)

Hi,

I ran into this very odd problem today.
I have a content div, which is 60% wide with 20% on each side. In the left
20% I want to float a menu. An example is at
http://dev.terrabulgaria.com/test.html
In FireFox 2.0 this works exactly as expected. Same in IE7, except for a
horizontal scrollbar at the bottom, which can be used to view just some
extra whitespace. But in IE6, there is a major problem. The contents div is
shown nicely in place, but the float is placed all the way to the right,
with a left margin of about 110%, though the width seems to be correct.
It seems to me, that IE6 thinks that a percent is much more than it actually
is.
I have a similar problem at http://dev.terrabulgaria.com/Over_Ons with a
right float which is placed inside the red bordered center div, which I want
to float in the right margin.

I temporarily solved this by placing an extra stylesheet inside <!--[if lte
IE 6]> -- load ie6hacks.css <![endif]-->, where ie6hacks.css basically
overrides some margins with smaller values, but clearly this is not really
what I want.
Is this a bug in IE6, and can I solve this somehow without resorting to
conditional CSS and the like?

Thank you very much

Kind regards

Michael.
Back to top
Neredbojias

External


Since: Jul 17, 2007
Posts: 197



(Msg. 2) Posted: Fri Aug 10, 2007 5:10 pm
Post subject: Re: IE6: 1% is more than 1/100 body width?
Archived from groups: per prev. post (more info?)

Well bust mah britches and call me cheeky, on Fri, 10 Aug 2007 14:02:44
GMT Michael scribed:

> Hi,
>
> I ran into this very odd problem today.
> I have a content div, which is 60% wide with 20% on each side. In the
> left 20% I want to float a menu. An example is at
> http://dev.terrabulgaria.com/test.html
> In FireFox 2.0 this works exactly as expected. Same in IE7, except for
> a horizontal scrollbar at the bottom, which can be used to view just
> some extra whitespace. But in IE6, there is a major problem. The
> contents div is shown nicely in place, but the float is placed all the
> way to the right, with a left margin of about 110%, though the width
> seems to be correct. It seems to me, that IE6 thinks that a percent is
> much more than it actually is.
> I have a similar problem at http://dev.terrabulgaria.com/Over_Ons with
> a right float which is placed inside the red bordered center div,
> which I want to float in the right margin.
>
> I temporarily solved this by placing an extra stylesheet inside
> <!--[if lte IE 6]> -- load ie6hacks.css <![endif]-->, where
> ie6hacks.css basically overrides some margins with smaller values, but
> clearly this is not really what I want.
> Is this a bug in IE6, and can I solve this somehow without resorting
> to conditional CSS and the like?

A "sorta fix" would be to change margin-left:50% to padding-left:50%.

--
Neredbojias
Half lies are worth twice as much as whole lies.
Back to top
Michael

External


Since: Aug 10, 2007
Posts: 4



(Msg. 3) Posted: Fri Aug 10, 2007 8:31 pm
Post subject: Re: IE6: 1% is more than 1/100 body width?
Archived from groups: per prev. post (more info?)

"Neredbojias" wrote in message
news:Xns998867969FD9Ananopandaneredbojias@198.186.190.161...
> Well bust mah britches and call me cheeky, on Fri, 10 Aug 2007 14:02:44
> GMT Michael scribed:
>
>> I have a content div, which is 60% wide with 20% on each side. In the
>> left 20% I want to float a menu. An example is at
>> http://dev.terrabulgaria.com/test.html
>> But in IE6, there is a major problem. The
>> contents div is shown nicely in place, but the float is placed all the
>> way to the right, with a left margin of about 110%, though the width
>> seems to be correct.
>
>A "sorta fix" would be to change margin-left:50% to padding-left:50%.

Well, if I'd even call it a fix it would be a very restrictive one at the
least.
Padding would create the white-space inside the box, which would not allow
me to set the border, nor the background-color.
Since I don't have IE6 on this computer (hooray for pre-installed Vista) I
can't test if padding instead of margin would work; I could use the
conditional CSS thing to make a borderless backgroundless padded version for
IE6 users and the "normal" good-looking version for everyone else. I'm not
thrilled at that idea though.

But thanks anyway for the suggestion.

Regards

Michael
Back to top
G

External


Since: Aug 01, 2007
Posts: 20



(Msg. 4) Posted: Fri Aug 10, 2007 8:31 pm
Post subject: Re: IE6: 1% is more than 1/100 body width?
Archived from groups: per prev. post (more info?)

Michael wrote:
> Since I don't have IE6 on this computer

why?
http://tredosoft.com/Multiple_IE
Back to top
Michael

External


Since: Aug 10, 2007
Posts: 4



(Msg. 5) Posted: Sat Aug 11, 2007 11:55 am
Post subject: Re: IE6: 1% is more than 1/100 body width?
Archived from groups: per prev. post (more info?)

"G" <.@.> wrote in message news:46bcb641$0$14067$742ec2ed@news.sonic.net...
> Michael wrote:
>> Since I don't have IE6 on this computer
>
> why?
> http://tredosoft.com/Multiple_IE
"The installer isn't working under Windows Vista. Mike posted a howto in the
comments for running IE6 in Vista."
Which comes down to : you just install a virtual machine that runs XP, and
you can install IE6 on *that*.
That's a little too much work, while I have access to a computer with IE6.

That was not the problem though Smile
Back to top
Michael

External


Since: Aug 10, 2007
Posts: 4



(Msg. 6) Posted: Sat Aug 11, 2007 3:45 pm
Post subject: Re: 1% is more than 1/100 body width?
Archived from groups: per prev. post (more info?)

"Michael" wrote in message news:46bc7006$0$234$e4fe514c@news.xs4all.nl...
> Hi,
>
> I ran into this very odd problem today.
> I have a content div, which is 60% wide with 20% on each side. In the left
> 20% I want to float a menu. An example is at
> http://dev.terrabulgaria.com/test.html
> In FireFox 2.0 this works exactly as expected. Same in IE7, except for a
> horizontal scrollbar at the bottom, which can be used to view just some
> extra whitespace. But in IE6, there is a major problem. The contents div
> is shown nicely in place, but the float is placed all the way to the
> right, with a left margin of about 110%, though the width seems to be
> correct.
> It seems to me, that IE6 thinks that a percent is much more than it
> actually is.
> I have a similar problem at http://dev.terrabulgaria.com/Over_Ons with a
> right float which is placed inside the red bordered center div, which I
> want to float in the right margin.
>
> I temporarily solved this by placing an extra stylesheet inside <!--[if
> lte IE 6]> -- load ie6hacks.css <![endif]-->, where ie6hacks.css basically
> overrides some margins with smaller values, but clearly this is not really
> what I want.
> Is this a bug in IE6, and can I solve this somehow without resorting to
> conditional CSS and the like?
>
> Thank you very much
>
> Kind regards
>
> Michael.

Hmm, it looks like I needed
position: relative
to fix most of my problems.
Now I only need a few minor IE6 hacks and it's at least viewable.

Thanks.

Michael
Back to top
Martin Jay

External


Since: Sep 12, 2004
Posts: 200



(Msg. 7) Posted: Wed Aug 22, 2007 7:38 am
Post subject: Re: IE6: 1% is more than 1/100 body width?
Archived from groups: per prev. post (more info?)

On Fri, 10 Aug 2007 16:02:44 +0200, "Michael"
<compuchip_nl.TakeThisOut@hotmail.com> wrote:
>I ran into this very odd problem today.
>I have a content div, which is 60% wide with 20% on each side. In the left
>20% I want to float a menu. An example is at
>http://dev.terrabulgaria.com/test.html
>In FireFox 2.0 this works exactly as expected. Same in IE7, except for a
>horizontal scrollbar at the bottom, which can be used to view just some
>extra whitespace. But in IE6, there is a major problem. The contents div is
>shown nicely in place, but the float is placed all the way to the right,
>with a left margin of about 110%, though the width seems to be correct.
>It seems to me, that IE6 thinks that a percent is much more than it actually
>is.

Silly IE. Smile

Perhaps you could look at the problem from a different viewpoint, and
float the menu to the right and not give it a left margin. You will
have to give it an outer DIV, though.

CSS:

..menu {
float: right;
border: solid 1px blue;
width: 50%;
}

HTML:

<div style="float: left;">
<div class="menu">
Testing
</div>
</div>
--
Martin Jay
Back to top
Display posts from previous:   
       Webmaster Forums (Home) -> HTML
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum