Remove image borders

  • daviddoria

    #3018

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

    I added

    .entry-content img{

    border:0px;

    margin:5px;

    }

    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?

    Thanks,

    David

    Prasanna SP

    #23048

    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.

    Admin

    Syahir Hakim

    #23049

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

    Prasanna SP

    #23050

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

    daviddoria

    #23051

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

    Prasanna SP

    #23052

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

    daviddoria

    #23053

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

    Prasanna SP

    #23054

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

    daviddoria

    #23055

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

    Mod

    Kenneth John Odle

    #23056

    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.