
Responsive landing page using css, bootstrap and javascript
Design comparison
Solution retrospective
I need some help writing better and cleaner css can with provide me with guidance?
Community feedback
- @Ahmed-ElbaldPosted over 1 year ago
Hi Alain,
Regarding your question about better CSS, I wanna say there's no best way for doing that, but you should follow these guides in general:
-
I see you are using Bootstrap. But if you are at the beginning and you want to write cleaner CSS, you should try to make things on your own. Practice makes perfect. When you reach a point where you think you've got a good grasp of CSS, then you can use libraries like Bootstrap and Tailwend.
-
Try making use of CSS Custom Properties (Variables) as they make your code reusable
-
When adding
class
attributes, try to make them as descriptive as possible. For instance,class
attribute with values like "div", "one, two" or any generic name are not preferable. You can also use the BEM Naming Convention -
Kevin Powell has a great channel that is mainly interested in CSS stuff. Personally, this channel helped me a lot.
Besides that, there are some accessibility issues that I can mention if you are interested.
I hope you find that helpful.
Marked as helpful1 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord