The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

How can I hide the default color af a display: block?

  • # July 18, 2009 at 3:01 pm

    Hi to all !!!

    I’ll paste here my code that I made for a btn… ( the page that I am checking is not on line yet ) but the problem is that the ‘div’ has borders colored in blue… don’t know why… I just would like to hide this borders.. I’ve tried with border-style: hidden and some more ways…


    background-repeat: no-repeat;
    display: block;


    HTML code:


    Thanks so much!! Mc.

    # July 18, 2009 at 3:49 pm

    It’s the image that has the border, not the div.


    a img {

    to your CSS.

    # July 18, 2009 at 4:00 pm

    Otherwise, the if you give the image an HTML attribute of border="0" it will also remove the border.

    By default, images that are hyperlinked automatically get the blue border (like the blue and underline for hyperlinked text.

    # July 18, 2009 at 4:03 pm

    Fantastic tip!!!

    And the right way is:

    a img {

    Thanks so much !!!

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed