Hello, I’d like to center the box in my card, I tried to do something with the following code, but it centered the box both vertically and horizontally, which is not what I need. Could you please help me?
.box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-sizing: border-box; overflow: auto; }
Okay, this code does what I was looking for
.box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-sizing: border-box; display: inline-block; min-width: 92%; }
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.