I have a div/button element, can I make it a Squire shape using their parent width how to achieve this.
button {
width: 150px;
background: red;
color: white;
outline: 0;
}
<button>Button</button>
I have a div/button element, can I make it a Squire shape using their parent width how to achieve this.
button {
width: 150px;
background: red;
color: white;
outline: 0;
}
<button>Button</button>
you need to set width & height for parent and set button width & height to 100%
.parent {
width: 150px;
height: 150px;
}
button {
width: 100%;
height: 100%;
background: red;
color: white;
outline: 0;
}
<div class="parent">
<button>Button</button>
</div>
or set height: 150px
for button so it will be squire!