0

I have this image below, it a button.

I've set the border-radius to 50% to make it round. How can I either set the focus highlight around the button be round or not show it at all?

I can't seem to find the :focus or :clicked css in the Chrome begugger.

enter image description here

Here is the html

<button id="frontSave" type="button" class="btn btn-lg"><i id="cameraIconFront" class="fal fa-camera fa-2x"></i></button>
1
  • As far as I know you can't get border-radius to apply to outline, but if you need a highlight that does conform to the radius, you can use box-shadow instead. It should be pretty easy to make it look just like the native outline. If you have any followup questions, just @ me and I'll try to respond later tonight. Commented Dec 14, 2018 at 23:00

1 Answer 1

3

You'd just override the user agent stylesheet and replace the default outline with a border

Cheers

body {text-align:center}

button {
  border-radius: 50%;
  margin: 2rem;
  padding: 2rem;
  border: transparent 3px solid;
}

button:focus {
  outline: none;
  border: red 3px dotted;
}   
<button>FOCUS<br/>TEST</button>

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.