Fortytwo Fortytwo - 1 month ago 13
CSS Question

How can I set border bottom to none while using box shadow inset?

I just want no border on the bottom of the box, or is it not possible? The reason I am using 'box-shadow:inset' instead of the regular border style because it does not alters my box size and shifts my box out of position.

.box {
width: 82px;
height: 56px;
box-shadow:inset 0px 0px 0px 5px #AC92C4;
border-radius: 5px 5px 0px 0px;
}


https://jsfiddle.net/dcaktwuz/

Answer

You wrote:

The reason I am using 'box-shadow:inset' instead of the regular border style because it does not alters my box size and shifts my box out of position.

You can still try to make a border (with border-bottom: none;) and add box-sizing: border-box, which will include the borders (and padding) in the overall width and height of the element.

Comments