@Dipesh-sapkota1
Posted
Hi @Mjornog π Congratulation for completing front-end mentor challenge.π
- To answer your question for how to dynamically change size of an element? I would like to say It is not necessary to add height and width to a div. Naturally, browser tend to make web responsive, everything will fall into its place own its own and make necessary changes when it is required. We make web unresponsive by adding extra properties.
- You can implement these points to improve your code.
- Follow DRY (Don't Repeat Yourself) principle
- I saw too many repetition of same properties, use CSS variables to define properties at one place and you can use it again for multiple selectors.
- Learn about inheritance that will save you many lines of code.
- Start your CSS with a good CSS reset and base CSS for your elements.
- Make your website responsive
- You can start making your website responsive by following mobile first approach. It will make your life a lot easier.
- Use CSS Grid or flex-box to make precise alignment of layout.
3 . Organize your file structure
- For small project like this does not require multiple CSS. If it requires to add multiple CSS then organize your files in separate folders.
You did great on your project and happy coding! πππ
Marked as helpful