Remove image borders

  • daviddoria


    I’ve seen a few posts about how to remove these border (you can see them on both images here: (they are grey)

    I added

    .entry-content img{




    table td,

    table th,

    table tr {

    border: none;

    background: none;


    Right above

    /* =Non-classed HTML elements

    (does it matter where it goes?)

    like the posts I saw said to do, but the borders are still there.

    Any other suggestions?





    Yeah, the place of the code matters. The elements placed at the bottom of the style sheet loads first. (Hmmm.. or they are considered as the default elements) So, you should add modified codes after the original code. Else, you’ve to declare !important, like this,

    .entry-content img{
    border:0px !important;
    margin:5px !important;

    It’s not a good practice to modify the parent theme’s files. In that way, you’ll lose the modifications you’ve done to the theme on theme update. Consider using a child theme.


    Syahir Hakim


    CSS = Cascading Style Sheet, meaning the order of appearance on a website matters. Later declarations for the same element will override the earlier declarations.



    Ah! Thanks for the explanation.. I’m not good enough to explain those technical terms.. 🙂



    Hm, I put it at the very end (after .hide { display: none; }) and it still shows the grey borders?



    Hmmm.. I don’t see any Gray borders in your site..



    On the home page, please look under the “Education” subheading at the “Rensselaer” logo image.



    Erm… what I can see under “Education” is “Rensselaer” logo without border!



    Haha sorry, I had to clear my cache – all set now, thanks!


    Kenneth John Odle


    But definitely do this in a child theme or via custom CSS. (Hint: a .png file will look better than the .jpg file you currently have.)

    Marked as resolved.

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

  • You must be logged in to reply to this topic.