Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 7
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 :-)
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic