473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Floated image in a relative position div

Is this a known problem with IE6?

I have a provisional two column layout, the left menu column is positioned
absolute. The contents column is positioned relative.

The contents column has an image floated right. The placement is there in
IE6 but not the image.

It does not matter whether the DTD is strict or transitional

An incomplete test page is at http://www.australisolives.com/new1/

I notice that if I drag the window width to about 550 pixel (on a 800 res),
part of the image can be seen in the margin between the right column and the
left column. The image seems to be being layered under the right column.
z-index "is" declared on the right column but it doesn't seem to matter, in
relation to the jpg, whether it is declared or not, or a higher z-index is
declared on the floated image.

I have read http://www.w3.org/TR/REC-CSS2/visuren.html#q24 and subsequent
sections but cannot seem to find anything relative

Any assistance appreciated.

Louise
Jul 20 '05 #1
4 8260
boclair wrote:
Is this a known problem with IE6?

I have a provisional two column layout, the left menu column is positioned
absolute. The contents column is positioned relative.

The contents column has an image floated right. The placement is there in
IE6 but not the image.


Sounds like the IE6 Guillotine bug - although the issue is well known
the exact fix isn't.

I recently had a similar problem but I'm not sure how to adapt my
solution to your case as you have an absolute left position column.

The problem - from what I have seen - apparently has to do with IE6
messing up positioning a floated image that has a hyperlink wrapped
around it and that apparently the link background extends outside of its
container and thus causes a number of weird effects - depending on the
rest of the layout (not a very obvious thing for MS to have tested is
it????? - sarcasm intended ;-)

The problem is that this bug is no joke and can cause a lot of grief.

Solutions I have heard of involve wrapping another div around the float
img and possibly setting the width to 100% of the div - all in an effort
to keep this floated element under control. Neither worked for me and I
ended up making the element opposite the float a float as well and this
seems to work (although there is a small boundary when the window is
between 500-520 or so pixels wide that both floats dissappear).

Some have also mentioned doing a img {position: relative} on the floated
image as a work around but once again I saw no change -

If this isn't the Guillotine bug then count yourself lucky.

If it is, you'll probably unfortunately find it easier to switch layouts
before you'll ever solve it (at least that has been my experience).

--Nikolaos

Jul 20 '05 #2
Nikolaos Giannopoulos wrote:
boclair wrote:
The contents column has an image floated right. The placement is there in
IE6 but not the image.


Sounds like the IE6 Guillotine bug - although the issue is well known
the exact fix isn't.
[...]
The problem - from what I have seen - apparently has to do with IE6
messing up positioning a floated image that has a hyperlink wrapped
around it and that apparently the link background extends outside of its


I've hit that bug only once and all I could do was to add "background:
transparent" for the offending element[1]. In that case, it was easiest
to just hide the issue. The element is still rendered incorrectly but
because it's rendered as transparent, it doesn't matter.

[1] If Guillotine bug is indeed related to backgrounds only it should be
"easy" to locate the incorrectly rendered element by changing all
backgrounds to transparent and then restoring real backgrounds one by
one until the bug shows up again.

--
Mikko

Jul 20 '05 #3
Mikko Rantalainen wrote:
Nikolaos Giannopoulos wrote:
The problem - from what I have seen - apparently has to do with IE6
messing up positioning a floated image that has a hyperlink wrapped
around it and that apparently the link background extends outside of its
I've hit that bug only once and all I could do was to add "background:
transparent" for the offending element[1].


Interesting. This hasn't helped in any of my cases unfortunately.

In that case, it was easiest
to just hide the issue. The element is still rendered incorrectly but
because it's rendered as transparent, it doesn't matter.
If this worked it would be a great thing - and super easy to implement
but in most cases that I have come accross this hasn't made a
difference. In addition I'm not sure that its so much that the
background is opaque that causes the problem or that the rendering
engine simply miscalculates things by making the appropriate space for
an element but through a bug incorrectly computing the background to be
larger than it really is and thus not being able to place the element.

I think its the latter in most cases that I have come accross as the
element that is being floated is ussually the thing that dissappears.
Wrapping another element inside a div with the floated element has been
observed to take out both elements.

[1] If Guillotine bug is indeed related to backgrounds only it should be
"easy" to locate the incorrectly rendered element by changing all
backgrounds to transparent and then restoring real backgrounds one by
one until the bug shows up again.


I wish. Like I said I think its more of a miscalculation when placing
the element than the opaqueness of the background of the element - this
is why a weird rule like the following sometimes fixes things.

#show {float: left; position: relative}

or why for quite some time now I have picked up from this newsgroup that
its wise to have the following in your style sheet:

body * {position: relative}

The above I imagine helps but the problem is that there are many
different combinations of things that can cause this bug to appear and
thus the inability to focus on a single solution.

What amazes me is that this bug wasn't picked up before IE was released
- Did I just say that ;-)

Finally, I have observed IE 5 and IE 6 win to behave the same way on
this bug!!!! i.e. when the bug appears in one browser it will appear in
the other - when the page is adjusted the new behaviour fixed or not
will be the same in both browsers. So this is not just an IE 6 bug IMO.

--Nikolaos
Jul 20 '05 #4
Nikolaos Giannopoulos wrote:
I think its the latter in most cases that I have come accross as the
element that is being floated is ussually the thing that dissappears.
Wrapping another element inside a div with the floated element has been
observed to take out both elements.


Have I misunderstood you here? Or did you misunderstand my solution?

Given

<a href="foo.html"><img src="foo.png"></a>
with
img {float: left } /* or */
a {float: left }

we see a bug, what you call the guillotine bug. Change it to

<div>
<a href="foo.html"><img src="foo.png"></a>
</div>
with
div {float: left }

That is, take the float off the inline element. Put it on the block
element. But that is what you tried, right?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sylvian stone | last post by:
Hi, I'm trying to do something that has always been easy with tables - namely use a three column layout, and above the main layout, show three images - one on the absolute left, one on the absolute...
4
by: Jay | last post by:
Hi, How can I capture mouse position on Image? I found number of script capturing mouse position of the page. But I could not find anything based on image. What I want to find out is X Y...
4
by: sweep | last post by:
Hi there, I have a problem with some CSS I'm writing and I was looking for a little help. I have a nav bar at the top and left side of my page in CSS which work fine. The remaining space has a...
9
by: edski | last post by:
Using a technique I found here: http://www.vertexwerks.com/tests/sidebox/ I created these "dialogue" boxes: http://www.ebph.org/test.htm In IE6, the text does not wrap correctly around the...
2
by: Dale | last post by:
This seems like it should be simple and I am pretty sure I've done similar things a hundred times before but I sure can't seem to get it right this time. I have a GridView with a column of text...
6
by: Seth Illgard | last post by:
Hi, Im writting a custom CMS and everything looks great, except when I see the results in IE. What im trying to do is: *Have an image in a layer (or relative positioned, or just margined). The...
1
by: rsteph | last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important...
1
by: yawnmoth | last post by:
I'd like to center two floated divs but am unsure of how to do so. Here's my code: http://www.frostjedi.com/terra/scripts/demo/div-float-center.html It seems like setting the width of the...
1
by: rirby2 | last post by:
Hi everyone, I'm currently having a rendering problem in IE7 (haven't even tried the lower IEs yet), vs. what I see in FF2. The simplified site can be found at solerasd.com . (There are more...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.