@iormes
Submitted
Is there a specific way that css selectors or properties should be ordered?
@DevDan21
@iormes
Submitted
Is there a specific way that css selectors or properties should be ordered?
@DevDan21
Posted
I think in some cases they do matter however I'd put more importance on making sure that you're selectors and properties are well organized. It makes it easier for you to look it up when you need to make a correction or change a property as well as for others that you might be collaborating with.
This is the way in which I work and strive to get better at.
Hope this helps!
@MachineCode0101
Submitted
Centering the div vertically was unironically the most difficult part, and I still haven't managed it! so I did some hacks using "padding-top:30%" to have some space to the top of the screen/page. I did try grid and flex, with content, align and item properties to center my content but I just couldn't get it centered vertically!
How can I improve the centering of the content?
@DevDan21
Posted
Hi Matin
CSS>body - I would remove the following:
place items: center; padding-top: 30%;
and add the following:
justify-content: center; align-items: center; min-height: 100vh;
So that it looks like the below:
body { display: grid; justify-content: center; align-items: center; min-height: 100vh; text-align: center; font-family: "Outfit", sans-serif; background-color: hsl(212, 45%, 89%); }
Hope this helps buddy!
Marked as helpful