Jump to content

Honing CSS skills


Guest webdesignm

Recommended Posts

Guest webdesignm

I think I have got to a point with Css where I can build anything I or someone else have designed, my codes validates and also work in older versions of IE.

 

However, I can't help thinking that I'm still not there yet because my codes doesn't look the same as my web designer collegues. Their codes have a lot of '!important' and '-moz' and they use z-index and mainly position elements. I've never used !important and -moz and z-index in my codes (never had to) and I tend to float most things which they've already told me I shouldn't do.

 

The books I've read haven't taught me the above. Should I be coding like how they are? I would like to get really advanced at CSS.

 

So what advanced books out there should I be looking at reading? I'd like something quite new that also has a small snippet of Css3 but I want the focus to be Css2.1.

 

This book looks like it's inline with what I'm looking for Smashing CSS: Professional Techniques for Modern Layout - Eric Meyers

 

Anyone read it? Can anyone recommend anything else?

 

P.s - I have read CSS Mastery - I'd like something even more advanced.

Link to comment
Share on other sites

Don't necessarily compare your code to other's - maybe they are the ones who have it wrong? z-index for example, is misused a lot - or used where the tag has no impact. Here's a brief tutorial that explains the basics: http://www.csstutorial.net/2010/06/using-the-css-z-index/

 

There is also NOTHING wrong with floating things - it just depends on the context.

 

As to books, personally, I tend to forget what I read, instead, I learn on an as-needed basis, but I'm doing this mostly for fun next to my dayjob, so our circumstances likely are not the same. If you want to post the URL to something you built, we can look at your code and let you know what we think.

Link to comment
Share on other sites

No, Like Andrea I have learned all my CSS from web tutorials and forums like this one. I like Eric Meyers CSS/Edge, he helped create CSS.

 

Books are a waste of money, they get outdated fast and cannot be easily corrected as a web site can, mistakes are forever. I have in my possession one of the first books in German about XHTML. It literally states that XHTML is the replacement for HTML and I believed it for some time because it is in the book. The book was way off base in many areas. So web tutorials are better for learning things, as well as forums because if something wrong is said it will be pointed out fast or you get different opinions on things.

Link to comment
Share on other sites

I agree with the ladies, I have a lot of e-books on my pc and have not even looked at one. I thought they would come in handy. But I learned css from the video tutorials here and other sites that I will not mention here, that would be rude. I think that if you fell confident and your code is clean you are good. I have also never used the !important and do not even know what it means. As far as the z-index goes I have only had to use it once to put content on top of a stretched background.

 

Personally I do not think using a float based lay out is a bad thing. All types of layouts have there pros and cons. Like Andrea I learn new things as I need to to get the job done. Kinda like when I had my own constriction company. I had a lot of tools. But I did not get them all at once, I got them as I need them for the particular job that I needed. Before I new it I had to get a bigger place to store my tools. Like web designing you start with html then css and before you know you have php and javascript, now your tool box is getting full.

 

Do not worry about what some else's code looks like, as long as yours is clean. Everybody will have a little different style.

Link to comment
Share on other sites

!important is often used because the coder has so many css files and so many styles that he's got a bit lost and can't remember whether he's styled something before, so he uses !important to give it precedence. Lazy.

 

-moz and -o and -webkit and -khtml are used as prefixes for new CSS3 styles in conjunction with HTML5 and are temporary because CSS3 and HTML5 is still technically not finally released, so these prefixes will eventually be redundant. Styles with these, like

#box-shadow { width: 300px; height: 50px; -moz-box-shadow: 7px 7px 5px #888888 ; -webkit-box-shadow: 7px 7px 5px #888888; -khtml-box-shadow: 7px 7px 5px #888888; box-shadow: 7px 7px 5px #888888; background: #ddd; border: none; }

should always be followed by the basic style box-shadow: 7px 7px 5px #888888; for the future when all browsers should operate the CSS3 without needing a prefix and for those browsers which are properly up to date. At the moment some browsers need the prefix but some, like IE6,7 and 8, are still not processing the CSS3 styles.

Edited by Wickham
Link to comment
Share on other sites

I had a good laugh at the "ladies" bit and totally agree with everyone here.

 

If the code you are writing does not give you any problems across major browsers and platforms and only a few errors in IE (which everyone expects anyway) then you are definitely doing it the right way. So do not listen to your "friends" who are telling you otherwise.

 

As for learning, to keep up in this every changing internet world, you will need to learn the basics of PHP and Jquery and all that information is usually out there on the web. Google is your friend. Books are outdated, nobody reads paper anymore, big bookstores are going out of business and everyone has a Kindle or Nook of some sort if they really want to read.

Link to comment
Share on other sites

Funny Virtual would reply next, I thought she was a guy for the longest time until she "Corrected me" LOL, No apologies needed, it is not like it upsets me, hopefully my post made that clear. I never really thought it looks like a girl... but then again I know where the photo came from so know it is a guy.

 

As for Virtual's remark:

...nobody reads paper anymore, big bookstores are going out of business and everyone has a Kindle or Nook of some sort if they really want to read...

blink.gif

But you can't fold over the corner of a Kindle!!!! tongue.gif

 

Slightly off theme, I will take a book any day for day to day reading of my Horror books and such, I hope they never stop printing books. But for coding tutorials and the like, web is the way to go. But I get allot of books from audible.com and listen to them when carving or beading, or driving, riding the bus (or read on a bus) etc. Books take up allot of space though, so finishing a book underway is a drag. Books I really enjoy I will usually get in paper as well. We may get a nook for my daughter's trip to Germany this summer, give a 12 year old something to do on a long plane trip. It will not take up room or weight and we can down load entire series for her like Percy Jackson and the Olympians or Douglas Adams' books. After that though... the Nook is mine! The digital books are cheaper too.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...