homepage Welcome to WebmasterWorld Guest from 54.198.42.105
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
IE7 hyperlinked graphic problem
UserFriendly




msg:3129959
 4:59 pm on Oct 21, 2006 (gmt 0)

Well, downloaded the 'final' release of IE7, and I've found a page that doesn't render correctly. Knew it was too good to be true.

The problem is a set of hyperlinked images. The top 10% of the image acts as a hyperlink (cursor becomes pointing finger, clicking causes new page to load). But the lower 90% of the image does not act as a hyperlink.

Given that the code couldn't be much simpler:

<a ...><img ...></a>

has anyone got any idea why IE7 would have this trouble when this page has always worked in IE6, Opera and Firefox?

 

tedster




msg:3130041
 5:52 pm on Oct 21, 2006 (gmt 0)

Well, there must be something else in the code, right? Is the layout all done with divs, or is it table-based?

icantthinkofone




msg:3130060
 6:22 pm on Oct 21, 2006 (gmt 0)

Does the image tag have the closing tag, too?

UserFriendly




msg:3130104
 7:06 pm on Oct 21, 2006 (gmt 0)

Yes, it's all well-formed and valid.

I think the problem is caused by the style of the a element. It's set to float: left and while this lays things out properly, IE7 is choking on it where no other browser does. Removing that style ruins the layout of the page, but it does mean that the whole graphic acts like a hyperlink again.

No idea why it's doing that, but I'm trying to find a way to get it to layout properly without making IE7 burst into a tantrum. Man, I hate Internet Explorer.

UserFriendly




msg:3130113
 7:17 pm on Oct 21, 2006 (gmt 0)

Even if I put the a element inside a div, and make the div float left instead, still only a part of the image reacts as a hyperlink.

Even if I remove styles from the containing div, or the image, or remove the title attribute from the image, still it doesn't fully react as a hyperlink. This is going to bug me.

UserFriendly




msg:3130120
 7:27 pm on Oct 21, 2006 (gmt 0)

Actually, it's caused by the div that comes after the float containing a line set to italic style.

Exactly at the same vertical height as the p element that is formatted with style

font-style: italic;

the graphic float on the left stops behaving as a hyperlink.

This must be a bug in IE7, surely?

[edited by: UserFriendly at 7:32 pm (utc) on Oct. 21, 2006]

tedster




msg:3130203
 10:52 pm on Oct 21, 2006 (gmt 0)

I think the problem is caused by the style of the a element. It's set to float: left

Have you tried applying a float style to the image, rather than the anchor element?

UserFriendly




msg:3130824
 5:21 pm on Oct 22, 2006 (gmt 0)

Thanks for the suggestion, tedster, but that doesn't fix it. I'm pretty sure it's just a sign that IE7 isn't going to save the day as far as cross-browser standards go. I've found another page that renders fine in every main browser except IE7.

So once again it's the old game of messing around to please Internet Explorer's broken engine. I hate that game.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved