@sandro21-glitch
Posted
Hi Sandu
Here are a few suggestions for improvement on your code:
Consider using CSS variables to store values that will be reused throughout the code, such as colors or font sizes.
Use CSS Flexbox or Grid to control the layout of the elements and make it easier to adjust the layout in the future.
Flexbox:
You can use the CSS Flexbox layout to center a div both horizontally and vertically. For example:
.parent { display: flex; align-items: center; justify-content: center; height: 100%; }
.child { width: 300px; height: 200px; }
Grid:
You can use the CSS Grid Layout to center a div both horizontally and vertically. For example:
.parent { display: grid; place-items: center; height: 100%; }
.child { width: 300px; height: 200px; }
Consider using a CSS reset to standardize the default styles across different browsers.
Make sure the font-family is imported or available to avoid unexpected results in different browsers.
Happy Coding
Marked as helpful