WordPress.org

Ready to get started?Download WordPress

Forums

How come still no border on images? (13 posts)

  1. Hulbert Lee
    Member
    Posted 3 years ago #

    Hi, I inserted this code into my style.css:

    .entry img{
      border: 1px solid #ddd;
    }

    however, my image on the front page (and the images of the interior pages), still show no border.

    http://howtofocusbetter.com/

    How can I make this border appear for my images?

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    these styles in style.css are more specific:

    .entry img.alignleft, .entry img.alignright, .entry img.aligncenter, img.single-post-thm {
    border: 2px solid #ffffff;
    padding: 3px;
    }
  3. jomsky
    Member
    Posted 3 years ago #

    Line 86 of your style.css, change the border color or delete it entirely because it's overriding your style.

    I suggest you use the Firebug extension for Firefox to easily troubleshoot problems like this.

  4. Hulbert Lee
    Member
    Posted 3 years ago #

    I'm sorry if this is a newbie question, but how do I located where line 86 is on my style.css so I can delete it?

  5. alchymyth
    Forum Moderator
    Posted 3 years ago #

    how do I located where line 86 is on my style.css

    by chance, line 86 is the one i quoted earlier.

    otherwise, you would need an editor with line numbers.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    Try looking for the code that alchymyth posted.

  7. jomsky
    Member
    Posted 3 years ago #

    Yes it's the same, the code above was included on my reply but upon seeing alchymyth's post above me I removed it.

    Again Firebug can help you a lot. Good luck!

  8. Hulbert Lee
    Member
    Posted 3 years ago #

    Cool, it worked! My last question is how do I change #ddd into a different color other than light gray?

    http://howtofocusbetter.com/

  9. jomsky
    Member
    Posted 3 years ago #

  10. arrentan
    Member
    Posted 3 years ago #

    Hulbert,

    Just choose the html color code that you wish to use and replace it with the original #ddd color.

  11. Hulbert Lee
    Member
    Posted 3 years ago #

    Hi, I changed:

    .entry img{
    border: 1px solid #ddd;
    }

    to a blue border:

    .entry img{
    border: 1px solid #0000FF;
    }

    but noticed that this works some of the times. For example, on my salespage: http://howtofocusbetter.com/focus-guide

    the top image still has the original gray color; however, the "Add To Cart" button has the blue border that I wanted to.

    How can I get it where all my images have the blue border?

    Thanks in advance.

  12. jomsky
    Member
    Posted 3 years ago #

    Because that is not the code we asked you to change. If you really prefer changing that though you could just make it like this:

    .entry img {
        border: 1px solid #0000FF !important;
    }
  13. Hulbert Lee
    Member
    Posted 3 years ago #

    I got it now. Thank you so much.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.