Harsh Kumar• 1,390
@thisisharsh7
Posted
Hey Jonathan Samael, Good Job ! your solution works fine but there are some improvement which could be made
- For aligning the whole content to the center of the screen you should not use body
.white-box{position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);}
instead try thisbody{min-height: 100vh; display: flex; align-items: center; justify-content: center;}
and for now remove.scratch-price{position: absolute; right: 6.5%; bottom: 22.5%}
. - You cannot use width and max-width property at the same time only one is going to work like here in your
@media(max-width: 576px){ .white-box{width: 365px; max-width:576px;} }
. - Avoid giving every item width and height and if you really want use percentage width or max, min-width and height property.
- For aligning the price don't use
position
property instead usedisplay: flex
and then try to align the items it will work fine.
Hope it helps....
Marked as helpful
1
Jonathan Samael• 130
@JonathanSamael
Posted
@thisisharsh7 Thanks! You helped a lot! I'll study more about flex property and make changes.
1