WordPress.org

Ready to get started?Download WordPress

Forums

Putting a border on linked images (6 posts)

  1. Mithrus
    Member
    Posted 6 years ago #

    Okay, so I know how to do this, but there is a slight problem preventing me from doing so. If you go to my site: http://www.savingprogress.com, you will see four images sitting under the header. I did the coding and such for these so they would be situated there. I just stick the links for them in the header file. I know, there is probably a much better way of doing it, but I'm no expert.

    Anyway, I want to be able to have a border on all linked images, except these four. This is because of the way they are positioned, so I have to put the border on them myself, in Photoshop. So, I was wondering if there was a way to put them in a separate class or something so that if I made it so linked images had a border, these four would remain borderless, but still be linked images.

    Any help is greatly appreciated. Thanks.

  2. Darran
    Member
    Posted 6 years ago #

    You can always use a special class for the links you don't want images.

    border: none;

  3. Mithrus
    Member
    Posted 6 years ago #

    That's what I have right now, for all linked images. What I want to know is how I would make a separate class for just these four images.

  4. Darran
    Member
    Posted 6 years ago #

    You can use something like this.

    <img class="noborder">

    The class can be something like this

    img.noborder {
    
    }
  5. Mithrus
    Member
    Posted 6 years ago #

    Ah, so I would add:

    img.noborder {

    border: none;

    }

    to the style sheet. And then, I would add class="noborder" to the images I don't want to have a border when their linked?

    I'll give it a try.

  6. Mithrus
    Member
    Posted 6 years ago #

    It worked. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic