Reputation: 1231
I'm using bootstrap to get some design on my website. This button gets an outline in yellow which isnt supposed to be there. If i click anywhere on the page after the pageload, the yellow "border" disappears.
Anyone got a clue what might be wrong? I'm using the class 'btn-warning btn'
Upvotes: 3
Views: 3670
Reputation: 44965
That golden outline indicates that the button gets focus.That means it will receive input from keyboard (try to press "Enter").
If it happens automatically on page load, it's called "autofocus". To prevent it use autofocus
attribute on <body>
:
<body autofocus>
If you don't want that golden outline ever appeared (which I would not recommend), disable it with CSS:
.btn:focus { outline: none; }
Upvotes: 7