Support » Fixing WordPress » Taking Borders off Pictures

  • Hi, my site is

    On my site I wanted to take the borders off pictures. But I wanted them to stay on images that are a “link” so if you click on the picture it can take you to another page.

    Any help would be appreciated!
    But, if its possible to leave the border on images on the main page, if its not possible, then its ok..thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Well, to take out the border on images, you’d go:

    img {border:0;}

    To leave the border on images that serve as a link, if your links are created like so:

    <a href=""><img src="" alt="" /></a>

    You’d go something like:

    a img {border: 2px solid FF66FF;}

    I hope this helps

    //Edit: P.S. I’m amazed that you can devote an entire website to the history of ONE brand of sneakers! LOL

    hahah well I own another site with everything

    But were do I take this out at? Border:0?

    Ok I found out how to take it off, thanks..

    But now how do I have it added for images that are Links?

    hmm, in your CSS, you add the code I gave you in my first response.

    I can’t tell you *exactly* how to do it, but I’ve given you a typical way to call an image as a link (the image tag within a link tag), then the line of CSS styling to add a border for those images.

    a img {border: 2px solid FF66FF;}

    Note, the colour I gave the border is an ugly pink, adjust as you see fit 😉

    If you wanted to remove any borders on images ‘within’ posts without effecting images not in posts you could try:

    .post img{
    border: none;

    To add for only linked images in posts:

    .post a img{
    border: 2px solid #999;

    (just throwing this in as an example of how you can control styles based on ‘where’ an <img> is).

    So under “Posts” I found this

    .post img {

    Which I changed border to say 0

    But when I add in border: 2px solid #999; it makes a “grey” box around all images once again.

    So how do I do this just for image links?

    Try the other one. 😉

    .post a img{
    padding: 4px;
    border: 0px;

    Notice the “a” after “.post” ? This means for linked images only. So remove the other one and add that one.

    I’m trying to work this out as well, on my blog (

    I want borders around my images in the text, but not the header. Here’s my code, pasted from above, but I realized I might be stuffing things up:

    .post a img {
    border: 1px solid #ffffff; }

    img {
    border: none;

    Not all the images are linked at the moment, but I plan to have them all linked back to my flickr site, if that helps.

    Le G.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Taking Borders off Pictures’ is closed to new replies.