@kyusufm
Posted
Hallo,
To apply a style to something, we need to understand what the purpose of it. for example in this case, it was a qr-code. it display almost the same size in the desktop and mobile.
so you can set the width with static size. for example 280px, because it will not break even in a mobile (375px screen). using % for a component size in this case is not a good choice.
Goodluck on your front-end journey!
Marked as helpful
@jabnakar
Posted
@kyusufm Thanks! you are right! I fixed it right away. Thanks for the insightful comment I really appreciate it as a beginner
@kyusufm
Posted
@funtikar Glad to hear that.
Another small thing, to make a card in the middle you can add heigh and flex to your body css
body{
height: 100vh;
display: flex;
and you can remove the margin-top
on your card and keep margin:auto
.