Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outline inside of a button [closed]

Tags:

html

css

I have been trying to replicate this "subscribe to the newsletter button". I am having a hard time replicating the white "inside border or outline". example of the button

like image 952
Pablo Vera Avatar asked Sep 11 '25 06:09

Pablo Vera


2 Answers

You may use an inset shadow

button {
  background:turquoise;
  border:solid turquoise;
  padding:5px;
  box-shadow:inset 0 0 0 3px white;
<button>inside border ?</button>

You can also mix borders with inset and outset shadows http://codepen.io/gcyrillus/pen/yJfjl ;)

like image 177
G-Cyrillus Avatar answered Sep 12 '25 19:09

G-Cyrillus


You can simply achieve this button styling with a combination of border-radius and box-shadow:

button {
  background: darkcyan;
  border: 7px solid darkcyan;
  color: white;
  font-size: 1.5em;
  text-transform: uppercase;
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: inset 0 0 0 2px white;
}
<button>Subscribe to newsletter</button>

With the border rule you set the outer border and with border-radius you round the corners. This will also effect the box-shadow, which will produce the inner white border line.

like image 20
andreas Avatar answered Sep 12 '25 18:09

andreas