How to optimize CSS presentation in different window size for calculator project

Hi,

I’ve recently completed my calculator project but I would like to ask if there is any advice to make sure the numbers displayed in the buttons are centered.

Here’s my codepen:

Replace width with px size, instead of vw.

a {
  margin: 5px;
  width: 60px;
}

calc

1 Like

If you rely on using pixels to arrange fixed width centering, then you are doing it wrong. You would be much better off with flexbox:


1 Like