• Resolved TipsHatPolitely

    (@tipshatpolitely)


    Hello! First of all, Tracks is beautiful. So, thank you for creating it!

    I’m trying to figure out how to make the padding around images on my page smaller so the gap between my images and text wrapping around them isn’t so large. Can you please advise how to manipulate this padding, specifically telling me where in the CSS regular media padding code is? For further clarification, I’m talking about images and text placed into a standard page. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Could you please link to the site?

    Thread Starter TipsHatPolitely

    (@tipshatpolitely)

    Hey webdev2087 – thanks for replying!

    For: https://jeffrosickmusic.com/tv-film/
    The space between the images and text is larger than I’d like, an invisible thick border.

    For: https://jeffrosickmusic.com/commercial/
    The padding around the images creates a space (again, larger than I’d like) between the audio player and the image and text in line horizontally with the image.

    I’ve already tried changing the em values in the following code, but nothing happens after I’ve hit “Update” and refreshed the website in another browser. Who knows – I’m pretty new at CSS, so I could be looking at the wrong section of code entirely…

    /* Images */
    .alignleft {
      float: left;
      margin: 0 1.5em 1.5em 0;
    }
    
    .alignright {
      float: right;
      margin: 0 0 1.5em 1.5em;
    }
    
    .aligncenter {
      text-align: center;
      margin: 1.5em auto;
      display: block;
    }
    
    .alignnone {
      margin: 1.5em;
    }

    Thanks again for responding. Cheers.

    @tipshatpolitely

    Please add !important to all your rules i.e.

    /* Images */
    .alignleft {
      float: left!important;
      margin: 0 1.5em 1.5em 0!important;
    }
    
    .alignright {
      float: right!important;
      margin: 0 0 1.5em 1.5em!important;
    }
    
    .aligncenter {
      text-align: center!important;
      margin: 1.5em auto!important;
      display: block!important;
    }
    
    .alignnone {
      margin: 1.5em!important;
    }

    Adding !important ensures your css is used as an override

    Thread Starter TipsHatPolitely

    (@tipshatpolitely)

    Nuts. Tried your suggestion, but it didn’t work. I was able to download a plugin called Advanced Image Styles, though, and it allows me to make the changes I’m after. Thanks again for your replies!

    Theme Author Ben Sibley

    (@bensibley)

    The changes you were making were to the style.css file, but Tracks loads a minified version called style.min.css to improve performance. This is why the changes were not taking affect.

    It’s generally a bad idea to edit Tracks’ files because you will lose all of your changes when you update to a newer version.

    To make changes to the CSS, you want to copy the code and add it to the Custom CSS section in the Customizer, or use a child theme. Then you can safely edit it there and you won’t ever lose your customizations.

    Glad you found a solution that works, and thanks for sharing the plugin you found. Let me know if you need any additional assistance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Standard Image Padding’ is closed to new replies.