0
Welcome Guest! Login
0 items Join Now

How to stop images that are also links from being underlined?

  • How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • On pretty much any template here, in the main css there is a text decoration of underlined rule for links. My problem is, that this also causes images to become underlined if I decide to make them links. So is there something I can put in the code where the image is applied to stop it from happening to just the images? I don't want to remove the rule all together, because I do want my text links to remain underlined. I tried adding text-decoration:none; to the span element that was there to center align the text under the image, but that didn't seem to do anything. So anyone know how I can stop the images from becoming underlined when I make them a link?

      Thank you,
      David Henderson
  • Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • Why not just add border="0" into the HTML of the image such as <img src="link" border=0" />

      Or a template rule such as
      img {
      border:none;
      }
    • James Spencer / Developer & Support / Hull, UK
  • Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • Hmm, the border thing I have been using to stop the border, but for some reason my virtuemart images seem to get underlined...will try your other option:) Thanks
    • GollumX's Avatar
    • GollumX
    • Elite Rocketeer
    • Posts: 2817
    • Thanks: 0

    Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • try this one..
      a img {
      border: none;
      text-decoration: none;
      }
    • Say no to Internet Explorer 6.
      twitter.com/mark_up
    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • gollum hit the nail on the head with that one....
  • Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • I think there may be something in virtuemart doing it. After James's comment, I realized that I always do a border: 0 for images, not a text-decoration: none, so it seems only on my product pages that the images are underlined, and not bordered:) I will try applying that statement to the template though, in the least, it will stop me from manually adding border:0 to every image I link:)
    • GollumX's Avatar
    • GollumX
    • Elite Rocketeer
    • Posts: 2817
    • Thanks: 0

    Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • if you provide a link, there'll be a better chance of us pinpointing the problem William.
    • Say no to Internet Explorer 6.
      twitter.com/mark_up
  • Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
  • Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • Open shop.css and insert
      a img {
      text-decoration: none;
      }

      The shop.css overrides the template_css.css of vortex
    • Last Edit: 17 years 11 months ago by James Spencer.
    • James Spencer / Developer & Support / Hull, UK
  • Re: How to stop images that are also links from being underlined?

    Posted 17 years 11 months ago
    • I added that, but the underline is still there. Would the fact that I am using the slimbox effect for the pictures make a difference here? Like perhaps the img tag isn't being used because of that or something?

Time to create page: 0.071 seconds