Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Border Color: How to set bottom border color?

Tags:

html

css

border

Current result: bottom border is colored gray

Desired result: all borders are white

Problem: border-color is set to white in the CSS

.zoom {
  border-width: 2px 0px 2px 0px;
  background: white;
  border-color: white;
}
<button class="zoom">???</button>
like image 784
L3R5 Avatar asked Nov 02 '25 16:11

L3R5


1 Answers

You have to set the border-style as solid explicitly for it to work. The gray border that you see at the bottom is because of the default UA styling which I is border-style: outset.

As noted by Marcos Pérez Gude in his comment the default border-style for buttons is outset and that for input and textarea elements is inset.

.zoom {
  border-width: 2px 0px 2px 0px;
  background: white;
  border-color: white;
  border-style: solid;
}
<button class="zoom">???</button>

Screeshot of UA Stylesheet Value:

enter image description here

like image 141
Harry Avatar answered Nov 04 '25 06:11

Harry