WordPress.org

Ready to get started?Download WordPress

Forums

Remove Borders from Post Images (9 posts)

  1. hipandhealthykids
    Member
    Posted 4 months ago #

    Hello,

    I've been looking at other threads and have tried many of the css coding to no avail. I noticed that the images I add to my posts have a border around them by default. I would like to add Custom CSS (not change the main file) to remove the borders on the post images.

    Hoping you experts can help. Thank you!

    Here's a page as an example...As you can see there is a border around the 2 pictures of the article that is undesired.
    http://www.hipandhealthykid.com/jessicas-granola-giveaway/

  2. vtxyzzy
    Member
    Posted 4 months ago #

    That link does not work.

  3. hipandhealthykids
    Member
    Posted 4 months ago #

    Sorry...I just migrated over to the new domain to go live yesterday. Here's an example of the boxes around the 2 images in the post link attached:

    http://www.hipandhealthykids.com/jessicas-granola-giveaway/

    Thanks for looking into this!

  4. vtxyzzy
    Member
    Posted 4 months ago #

    You should create a Child theme to make your changes. If you do not, all of your changes will be lost if you update your theme.

    Try temporarily adding this to the end of your theme's style.css:

    #main #content img { border: none; }

    To make it permanent, add it to the end of your child theme's style.css.

  5. hipandhealthykids
    Member
    Posted 4 months ago #

    Thank you. I tried that code you provided and nothing changed with the borders...Any other thoughts?

    Also thank you for providing information on the child theme. I am currently adding css to my custom css area of my theme, not changing the actual template code as (from what I understand) changing the background code would be problematic as new releases of the theme occur. I will read up on child theme.

  6. vtxyzzy
    Member
    Posted 4 months ago #

    I do not see the code anywhere. Which file did you add it to?

  7. hipandhealthykids
    Member
    Posted 4 months ago #

    I added it to the custom css of my theme. You can see my code?

  8. vtxyzzy
    Member
    Posted 4 months ago #

    I can see the files that get downloaded to my browser. I cannot find the code I showed you, and it is not applied to the images.

    Try temporarily adding it to the end of style.css.

  9. hipandhealthykids
    Member
    Posted 4 months ago #

    I added it to the end of the stylesheet (instead of the custom css the theme provided for changes) and it worked! Now I just need to keep this code on file b/c if the developers release a new version of the theme this will likely be overwritten, correct?

    Thank you vtxyzzy!

Reply

You must log in to post.

About this Topic