Eliminate grey borders on images in posts

  • Author
    Posts
  • #3028391

    Hi,

    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.

    Examples:

    https://asweetdoseofreality.com/2017/10/04/las-vegas-shooting-crime-scene-photos-guns-corpse-first-look/

    https://asweetdoseofreality.com/2017/09/29/trumps-health-secretary-tom-price-resigns/

    https://asweetdoseofreality.com/2017/09/29/us-coalition-using-illegal-chemical-weapons-in-deir-ez-zor/

    Thank you.

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

    #3028529

    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 :)

    #3028530
    truthseekerblogger2015
    Member
    Original poster

    Hi,

    That worked!

    That was driving me nuts.

    Thank you very much.

    #3028533

    You’re welcome :)

    #3028543
    truthseekerblogger2015
    Member
    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;
    }

    #3028545

    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.

    #3028563
    truthseekerblogger2015
    Member
    Original poster

    Any page that has a youtube video.

    https://asweetdoseofreality.com/2017/10/04/pure-chaos-las-vegas-police-release-first-body-cam-footage-from-shooting/

    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.

    #3028572

    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;
    }
    #3028604
    truthseekerblogger2015
    Member
    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.

    #3028605

    You’re welcome :)

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