I am a programmer doing web development for over two years now. Even though I’ve been doing front end engineering for the past two years I don’t think I have done it the right way
For instance:
display: none
and visibility: hidden
(well, I know it now. but there are many cases like- padding, margins, overflows etc)#
and not a class.I know I am doing a lot of things wrong(and I need to get it right) here but I manage to get things into place and somehow show it up, only to see it messed up in a different browser.
I don’t want do a primer on CSS or CSS for dummies. I know more than that. I want to learn CSS the right way. Focusing on problems like the examples I showed above and rectifying them.
Can you point me to resources or add common suggestions and tips used by CSS developers to get it right.
In CSS, first read the theory on what CSS is, how it works in the browser, and its basic syntax and usage. Learn about the different kinds of stylesheets available, their differences, selectors, and basic styling such as font-size , width , height etc. You can get started by going through the tutorials at MDN.
How Long Will it Take to Learn CSS? For an average learner with a good degree of discipline, it should take around seven to eight months to build up a working knowledge of CSS (and HTML—as they are almost inseparable). At the one-year mark, you'll have built up more confidence.
Unlike a programming language that requires knowledge of loops, variables, and other concepts, CSS is pretty easy to pick up. Maybe it's because of this that it has gained the reputation of being simple. It is simple in the sense of “not complex”, but that doesn't mean it's easy.
Check out Designing With Web Standards by Jeffrey Zeldman.
Here are some general rules to live by:
<div>
s. Doesn't make sense.<div>
tags, stay away from tables. Get to know the float property well. With CSS3, there are going to be new, improve standards to the display property. Learn them.display: none
completely removes the element from the viewport. Conversely, visibility: hidden
retains the whitespace that the element would have otherwise taken up. In both cases, the element remains in the DOM. I have about a million other things to say but that should get you started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With