The moose likes HTML, CSS and JavaScript and the fly likes anchor tag image not coming in firefox, chrome but working fine in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "anchor tag image not coming in firefox, chrome but working fine in IE" Watch "anchor tag image not coming in firefox, chrome but working fine in IE" New topic
Author

anchor tag image not coming in firefox, chrome but working fine in IE

Vinodh Sa
Ranch Hand

Joined: May 06, 2010
Posts: 55
Hi All,
Another browser compatibility issue here. (atleast, i guess so :-( )

I am using the html anchor tag with a image as background, and providing the path of the image through CSS class inorder to provide caching support.

Pasting the code below here.





The problem is that in IE everything works fine, the image is coming and on click of the image its re-directing to google as well.

But in firefox and chrome the image is not coming and no on-click is working.

I am not even getting the image not found error (the cross mark one). Its like the entire component is not generated. But when i add any text between the anchor tag say "hello"
( hello ),
then i am able to see the text and on-click is also working.

Not able to find where's the issue here.


Thanks, Vinodh
[Servlet tutorial]
Jee Ba
Greenhorn

Joined: Feb 08, 2011
Posts: 7
Not sure it can help, but maybe putting a .dot there an making the color the same as the browsers, or putting a font-size:0 could help you. Other things could be giving that <a> a width an height and a display:block.
Vinodh Sa
Ranch Hand

Joined: May 06, 2010
Posts: 55
Jee Ba wrote:Not sure it can help, but maybe putting a .dot there an making the color the same as the browsers, or putting a font-size:0 could help you. Other things could be giving that <a> a width an height and a display:block.


Thanks a lot Jee. adding display:block in the css worked :-)
 
 
subject: anchor tag image not coming in firefox, chrome but working fine in IE
 
Threads others viewed
Dynamic close button only shows in Firefox
help with select script
CSS issue
Display Tag css issues in IE and FF
spring internalization not working in IE
MyEclipse, The Clear Choice