Any tips on CSS?

Hello!

So both HTML and javascript (so far) are pretty straight forward, I guess me coming from a numerical background helps here. But with CSS, I find it very difficult. I know for instance how I want my webpage to look like and I can get answers from this forum on specific issues. But I still dont really grasp the underlying logic, I am not able to visualise it!

Any tips on good resources here? Besides freecodecamp obviously?

Try the bootstrap package for an easier time.
Generally CSS is a big field… like, if you talk general than you have to visualize the page as a bunch of stacked and layered rectangles. Each element is a rectangl e(margin) inside a rectangle (padding) inside a rectangle (content). You can manipulate each and then have to think about how to stack them on the page.

Then ofcourse come some interactions inbetween elements if their sizes don’t align properly.

I would start with the concept of the box model:

2 Likes

Wow very helpful resource, will go through this from scratch! thank you

CSS is fiddly and I’ve learned it mostly through a lot of fiddling, trying to make something work, googling why it didn’t work, and fiddling some more. When there are specific things you want to do with CSS, there are often guides online but even then the solutions might not work perfectly because the other CSS on your page affects the outcome.

It’s awesome to play around CSS and learn new advanced tricks and techniques, and I hope these advanced CSS tricks and techniques will certainly help you create mind-blowing websites.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.