I am just getting frustrated with CSS. I already used w3schools.com, and I know the basics of CSS. However, my problem is that I can not put everything together. In other words, I can modify a CSS file without any problem, but I can not write a complex CSS file from the scratch. So, I would like to know when we design a website(using HTML and CSS), do we need to first write HTML code and then come up with CSS. Or do we need to write HTML and CSS codes in the same time? Please let me know if you know any good web site or book with updated
information. The other problem with CSS is cross-browser. I have done a site that works with Firefox and IE6, but it does not properly work with IE7. Thus, how to learn CSS properly?
4 Comments to “How to learn CSS properly?”
No related posts.
Filed under CSS HTML Design HELP




I used the Head First HTML & CSS book to get a good understanding of HTML & CSS. The book is geared to the novice. I had similar problems when I first began writing HTML & CSS, because I had learned from the web. I could understand the syntax, but had no idea on what good HTML & CSS “coding style” was. So a lot of my pages were crap.
Other than that, just practice and look at other well designed web pages.
HTML structures the data, CSS adds the aesthetics. In terms of doing things properly, you should have your CSS in a separate file, and avoid inline CSS, instead using IDs and Classes. As for when to write it, it’s really up to you. It makes no difference when you add it.
Browser incompatibilities are annoying for even the most experienced programmers, so don’t think it’s just not understanding things correctly.
I have a few resources for you to read:
- http://www.htmldog.com
- http://www.w3.org/Style/CSS/learning
Once you’ve get your foot dirty, dive deeper on A List Apart (http://www.alistapart.com/topics/code/css).
Try to learn web standards, web accessibility, and web usability as well. We all need a better web. :)
–
gd
Practice, Practice, Practice. Begin, by looking at all the various CSS elements and practice with boxes to see how they all work. Try to vision what you are doing and mock up the HTML, before applying the CSS. Then put the CSS on and see how many changes you had to do the the HTML. I always mock it up in HTML first. That method can backfire a little. Break your page up into parts and mockup, and then apply the CSS by part. It’s really hard to get practice on your own time, when you don’t do it for a living. But, put any time you have into it, and you will get it soon. You’ll be able to make a really awesome, complicated design, that works the same in all browsers. Try to test your changes in all grade A browsers, to see where the inconsistencies are and then learn how to avoid them. It’s now difficult, but it will become easy. However, there is always more to learn. As soon as you get past this hurdle, you will need to learn to script the DOM.
Try to do as much as you can using as little HTML as possible. CSS can do a lot! I never tried this, but post some practice code and ask people how it could’ve been better. If you are taking a lot of time designing something to build, then don’t do that. Look up fun designs on the internet and then build it. Or, ask for someone else to design the site, and then see if you can build it for them. Don’t spend too much time in the design process. Try to get free designs and mock them up. Practice liquid layouts that … I have to go.