Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25501
    McCss
    Member

    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…

    Code:
    #btn{

    background-repeat: no-repeat;
    width:172;
    height:36;
    margin-left:33%;
    margin-top:-20%;
    display: block;

    }

    HTML code:

    Code:

    Thanks so much!! Mc.

    #60943
    TheDoc
    Member

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

    Add:

    a img {
    border:none;
    }

    to your CSS.

    #60944
    AshtonSanders
    Participant

    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.

    #60949
    McCss
    Member

    Fantastic tip!!!

    And the right way is:

    Code:
    a img {
    border:none;
    }

    Thanks so much !!!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.