Alexander Heo
@AlexanderHeoAll comments
- @carrillodev@AlexanderHeo
Spot on!
- @MindaugasJ88@AlexanderHeo
Here's my two cents on fixed vs responsive sizing. Keep in mind I am new to webdev, about 8 months of studying and i just starting to look for my first job.
So this has been my latest approach: the main container - responsive. this way the background image or color gradient will resize automatically with the screen. images, buttons, and other components - fixed. i don't want a button to stretch with the screen. same for images, i always set a specific pixel by pixel width and height on images, or image containers, and use media queries to make them responsive. certain things like side bars i like to set a fixed width, while the rest of the DOM will be set responsive. As far as selectors: this was something that took me a long time to get, and i'm still modifying my system with every project. but bottom line is to have a system. i like to plan out the styling so i know which elements will need styling, and which classes can be reused. learn the sibling and child selectors, and pseudo-classes like
:nth-child(), :first-of-type
, as these will help you select specific elements without giving every single element a class name. Hope this helps; these are such dense topics and there are so many different approaches to them.