Forums / Templates, Stylesheets, Page Layout / Linked images underlined in firefox

Linked images underlined in firefox

Locked

Views: 3,623

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
22 Dec 2006, 10:46 PM
#1
daves avatar

daves

Zen Follower

Join Date:
Dec 2006
Posts:
102
Plugin Contributions:
0

Linked images underlined in firefox

Please help, this is doing my head in!

In Firefox some images which are links are displaying a blue underline link, like linked text..

here..

http://www.tonedeafmusic.co.uk/shop/index.php?main_page=index&cPath=1

and here...

http://www.tonedeafmusic.co.uk/shop/index.php?main_page=product_info&cPath=1_7&products_id=1

After reading some good advice in another thread I added

img {display: block;}
```which fixed the problem... no more underlines.. only problem is, now the images are no longer ```
display: inline
``` so they are left aligned and have a line break after them.

I'm guessing there is no css solution to this, as it seems to be a problem with the html on the page. The generated html reads....

 

<a href="http://www.tonedeafmusic.co.uk/shop/index.php?main_page=index&cPath=1_9"><img src="images/pitch-pipe.jpg" alt="Other Accessories" title=" Other Accessories " height="150" width="200"><br>Other Accessories</a></div>


<a href="http://www.tonedeafmusic.co.uk/shop/index.php?main_page=index&cPath=1_9"><img src="images/pitch-pipe.jpg" alt="Other Accessories" title=" Other Accessories " height="150" width="200"></a><a href="http://www.tonedeafmusic.co.uk/shop/index.php?main_page=index&cPath=1_9">
<br>Other Accessories</a></div>


But where do I go to make it generate it like this? php is beyond me!

Thanks in advance to anyone who can sort this!
22 Dec 2006, 10:50 PM
#2
daves avatar

daves

Zen Follower

Join Date:
Dec 2006
Posts:
102
Plugin Contributions:
0

Re: Linked images underlined in firefox

Just to make the html example a little clearer I will post it again but remove the filenames and other junk...

The generated page reads...

 <a href="page link"><img src="image.jpg"><br>Other Accessories</a>
```Whereas I think it should read...

<a href="page link"><img src="image.jpg"></a><br>
<a href="page link">Other Accessories</a>


Maybe without the <br>, not sure on that bit.

Hope that reads easier!
29 Dec 2008, 4:05 PM
#3
cipfriction_com avatar

cipfriction_com

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Linked images underlined in firefox

I'm having the exact same problem, I tried the display:block property, this solves the underline under the image but now displays the page incorrectly (images far left and links centered no longer under the images)

I've been looking into this problem all morning all over google and it seems to be a problem lots of people are having, does anyone here have a fix?

Thanks!

29 Dec 2008, 4:34 PM
#4
cipfriction_com avatar

cipfriction_com

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Linked images underlined in firefox

I GOT IT !! :clap:

Insert this in your stylesheet.css :

a img {
    border: none;
    vertical-align: middle;
}

The important part is the vertical-align statement, which "drops down" the image a bit from what I've read to probably disassociate the image from the link in Firefox, anyways it works!

Tried in both Firefox 3.0 and Internet Explorer 7.0 and works/displays perfect for me without that annoying underline in FF!

Let me know how it turns out on your side!

David