Previous Message
Next Message

IE5 Win Bug - <img> in floated <a> --> <a> doesn't work!

Sent by Zoe Gillenwater on 18 November 2003 12:12

James Bebbington wrote:

> On 12 Nov 2003, at 19:03, Steve Clay wrote:
>> What I've found is that IE5/win will deactivate links that are displayed
>> as block, which is, by the specs, what is done when you float an 
>> element.
> So are you saying that this is the correct behaviour??? Surely the w3c 
> specs don't specify that, do they?!? 

No no -- he meant that the specs dictate that a float is a block 
element, that's all.  It is not in the specs for IE5 Win to deactivate 
links that are block elements.

>> The solution is to float neither the images nor anchors.  Both As and 
>> IMGs
>> are inline and will happily sit on the same line if there's adequate 
>> space.
> I have followed your advice for a work around (deadline is today) but 
> feel that I'm going against the whole CSS ethos by doing so. I feel 
> its a bit of a cop out, although don't get me wrong, I do appreciate 
> your help :) There must be a 'proper' of doing this without IE5 Win 
> barfing. 

There is nothing improper about leaving links and images inline so they 
sit on the same row -- where in the specs does it say you have to float 
these tags?  In fact, I would say this is more proper, because you are 
allowing the tags to exhibit their natural behavior, and not adding 
extra unnecessary markup.

Perhaps you are suspicious because it just seems too easy, but don't 
be!  CSS and web standards are supposed to be easy -- thank your lucky 
stars that you are in a situation that does indeed have an easy 
solution, and move on to the next true hurdle!


Zoe M. Gillenwater
Design Specialist
Highway Safety Research Center

css-discuss [EMAIL-REMOVED]]
Supported by --
Previous Message
Next Message

Message thread:

Possibly related: