• Resolved chrisk860

    (@chrisk860)


    When I added images to the 4 main widget displays (like the demo) I was able to remove the padding on those images with this code:

    <div  class="post-thumbnail" style="margin-top:0px; padding:0px;">
    <img class="center" src="https://www.greatpointmediadesign.com/wp-content/uploads/2014/05/http-image1.jpg"  /></div>

    But when I am editing a regular page and I “insert media” into the page, the theme generates a padded box around the images which I want to remove. Since there is no place to add the code (above) because the image is not being added via a widget, how would I remove the padding.

    site url: https://www.greatpointmediadesign.com
    speaking specifically about the email marketing examples image on the email marketing page, and the marketing examples image on the marketing services page.

    Thank you for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m going to assume you do not want the styling around the images when you insert them?

    In the theme’s style.css around line 1968 is this:

    img.alignleft,
    img.aligncenter,
    img.alignright,
    img.alignnone,
    div.wp-caption img,
    .entry-attachment img {
    	padding: 8px;
    	background-color: #f6f6f6;
    	border: 1px solid #d2d2d2;
    }

    What you can do is replicate that with your own custom CSS by making the padding 0, and the border 0 (if you don’t want a border)….etc. When doing custom CSS, it’s best to use the child theme method (which this theme has one in a folder “child-theme” you can install, but if you only plan to make only CSS changes, then a plugin like Simple Custom CSS will do just fine. This way you can keep Celestial Lite up to date without losing your changes.

    Thread Starter chrisk860

    (@chrisk860)

    Yes I am working with the child theme already so I will try this change to the CSS file that I have in the child theme folder.

    Thread Starter chrisk860

    (@chrisk860)

    I made the change in the CSS file, which in turn removed the padding and border (set to 0) around the image, but it still looks like I am getting some kind of border.

    On this page I experimented by adding a simple image (.gif) in the right sidebar and you’ll see it looks like it has a border and a grayish background. The image I uploaded has a white background. How do I get this (and future) images to appear with looking like there is a box around it?

    https://www.greatpointmediadesign.com/web-design/

    Make sure you also do:

    border: none;

    or

    border: 0;

    I had the same issue. This worked for me

    img.alignleft,
    img.aligncenter,
    img.alignright,
    img.alignnone,
    div.wp-caption img,
    .entry-attachment img {
    padding: 0px;
    background-color:transparent;
    border: 0px solid #d2d2d2;
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I remove padding around media images?’ is closed to new replies.