Image Post CSS

  • Posted in : Bloggy WP
  • allainajeffreys
    Participant

    When I create a new post, and specify the format as an “Image” post, there is a style applied to the media (photo) that rounds the four corners of the media. Is there a CSS code that I can add that will apply this same rounded corner treatment to all images in posts using the “Standard” post format?

    healthymamahappymama.com

    ahmetsali
    Keymaster

    Hi, try this custom css;

    .entry-content img { border-radius: 8px; }
    
    allainajeffreys
    Participant

    Thank you ahmetsali. That custom css code worked perfectly!

    HeyMimi
    Participant

    Will this work with images inserted on pages? Or only posts?

    HeyMimi
    Participant

    I guess it doesn’t make sense to make it apply to images on pages, because it would add rounded corners to every image, including design elements manually added to pages, such as headlines rows or a custom dropcap.

    But I’m wondering if there is something I could add to the “styles” field in the “advanced settings” in the image edit box, to round the corners on just specific images? See this screenshot: http://grab.by/tleQ (The image in the screenshot is already rounded in photoshop).

    What I’m trying to do is make a custom homepage that looks like a 2 column masonry page, with a sidebar. Here’s the layout, it’s not a live linked page, of course … but it’s just a mock-up : http://heymimi.com/main/ . Im trying to get masonry with a sidebar, basically. And I want those gosh-darn rounded corners! It’s not that big of a deal to manually round them in photoshop, but if there is an easier, more automated way … I thought it couldn’t hurt to ask!

    ahmetsali
    Keymaster

    you can write a specific custom css code for a page, in this case for your main page you can use this custom css code for images;

    .page-id-498 .entry-content img {
       border-radius: 8px; 
    }
    HeyMimi
    Participant

    Oh wow! That is perfect. Thank you for the custom code!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register