I have two divs and they should be the same size. I tried to put a height it works in desktop size but when I use different platform it become a mess
____________
| ___________
| | | |
| | | |
| | | |
|_|_________ |
|___________|
.custombox {
text-align: center;
padding: 10px;
position: absolute;
border: 1px solid;
}
.customparentbox {
background: red
}
<div class="customparentbox">
<div class="custombox">
<p>Sample text</p>
<button>test</button>
</div>
</div>
I've made some changes in your css
From
To
Here is a jsfiddle I made.