Little doubt about Buttons

1

Good morning I wonder if there is any way to get this blue line around the image, the image and a button

    
asked by anonymous 17.05.2018 / 11:02

1 answer

1

Just take the Outline of the element button like this:

button:focus, button:active {
    outline: none;
}

But you should not do this, even for the sake of Accessibility ... link

Think you can treat outline with css so that it has a cool effect instead of removing it. Here in the Mozilla documentation you can see some practical examples of how to style outline link

Examples of stylization of outline : (note that even the element being a P I can put the outline in it as a border only without interfering with the box-size )

p.dotted {outline-style: dotted; outline-color:red; outline-width: 5px;}
p.dashed {outline-style: dashed; outline-color:blue ; outline-width: 3px;}
p.solid {outline-style: solid; outline-color:green; outline-width: 3px;}
p.double {outline: 2px double gold;}
<p class="dotted">A dotted outline</p>
<p class="dashed">A dashed outline</p>
<p class="solid">A solid outline</p>
<p class="double">A double outline</p>
    
17.05.2018 / 11:55