Eliminate grey borders on images in posts

  • Author
  • #3028391


    I want to get rid of the grey borders around images in posts. There’s a light grey border and then when you hover any image there’s a darker border.

    I would like to keep the effect on featured images displayed on the home page. I just want to eliminate the effect from the posts themselves.





    Thank you.

    The blog I need help with is: (visible only to logged in users)


    Hi there,

    Please try adding the CSS below to the cutomizer in My Sites > Customize > CSS:

    .single-post .entry img, .single-post .entry img:hover {
        box-shadow: none;

    If the CSS doesn’t have the desired effect, please let me know.

    I hope this helps :)

    Original poster


    That worked!

    That was driving me nuts.

    Thank you very much.


    You’re welcome :)

    Original poster

    One more question.

    I may want to increase the width of the theme and I know how to do that.

    Do you know of a way to increase the dimensions of embedded YouTube and vimeo videos via CSS? I know how to center them via CSS but I would like to increase their dimensions if I increase the width of the theme. I would like to just increase their dimensions in the posts and not in the widget areas. The dimension I would like to increase them to is 854×480.

    Facebook videos automatically size themselves to fit the full width of the post body. YouTube doesn’t, it’s not responsive.

    The CSS I used to use with my old theme to center embedded videos is:

    .embed-vimeo iframe, .embed-youtube iframe {
    margin: auto !important;


    YouTube doesn’t, it’s not responsive.

    Can you post a link to a page or post where the video isn’t responsive?

    Embedded videos on WordPress.com should be responsive in all themes.

    Original poster

    Any page that has a youtube video.


    If I increase the width from the default 1100 pix to say 1200 pix that video will not increase in width. It’ll stay the same size as it was when the theme was at 1100. I’ve read some threads in forums on this issue and it’s a common problem with YouTube videos.


    Due to the way the maximum width of embeds are controlled by PHP and then resized with javascript for smaller screens, I’m not sure if this will work with – but try:

    .embed-youtube iframe {
        margin: 0 auto !important;
        width: 100% !important;
    Original poster

    Hey you’re pretty good, lol. Yeah that worked. Very nice.I noticed the height stayed the same and the width extended out. That just means there’s a smaller black border going across the top and bottom of the video which is fine, the ratio looks correct. That’s all I care about.

    I think the theme looks better with a little more width. I think the post layout looks better when there’s more width for the text.

    Thank you again.


    You’re welcome :)

  • The topic ‘Eliminate grey borders on images in posts’ is closed to new replies.