PDA

View Full Version : Can Anyone Recommend a Great CSS book?



phanio
05-19-2009, 01:58 PM
Can Anyone Recommend a Great (not good) but great CSS book?

vangogh
05-19-2009, 04:31 PM
I'll be honest. I only read a few since I picked it up pretty fast, but the few I did read I thought were very good and they happen to be written by one author, Eric Meyer (http://meyerweb.com/eric/writing.html). He's one of the css gurus and the link will take you directly to his books.

The two I read are Eric Meyer on CSS and the Programmer's reference. The latter is what it says, a reference. The first is probably the kind of book you want. He takes a web page that's been coded with a table-based layout and slowly works them to be all css. What I did was grab the original source code for each example from the site for the book and then typed the changes along with the book. I think it will give you a pretty good idea of how to go about coding an all css-layout. It's been awhile since I read the book, but I did find it helpful.

I didn't read it, but I assume More Eric Meyer on CSS will be similar. The CSS website design book looks good. I didn't read it, but it is his most recent book.

The best way to learn is going to be by coding though. You have to make some of the common mistakes in order to not make them anymore.

phanio
05-19-2009, 09:10 PM
I have made enough mistakes - trust me. My problem is that there are things that I want to do - and know that they can be done - but I can't seem to get them to work. Example right now is why part of my page works in IE6 and other parts don't. It is all coded the same way.

I also have been struggling with having a page auto size based on content - when I set the page the way I think it should be to do this, I lose my main div.

I try not to use tables (althought I would really like to use more - fits my personallity) - but this forces me to use absolute positioning - which causes so much more problems with formating.

Thanks for the link - I will check out his books.

thx4yrtym
05-19-2009, 09:23 PM
An Alternative to books is video training. have a look at this....
CSS - Online Training Library - lynda.com (http://www.lynda.com/home/ViewCourses.aspx?lpk0=29)

I would recommend the latest 2 series of videos. It's 13 hours spread over many short pieces of videos. For $25 you have access to everything on the site for 30 days. Make sure you cancel your subscription prior to the auto renewal date unless you wish to continue for the next 30 days.

I've watched many of their video series some more than once. Of those 98% are excellent.

good luck,

thx4yrtym
05-19-2009, 09:25 PM
By the way, absolute positioning is not your only option as an alternative to table which you will discover shortly. The CSS way of doing things can be frustrating, just hang in there, it will come.

vangogh
05-19-2009, 10:21 PM
I'll give a recommendation for the Lynda.com tutorials. I've never gone through any of them, but I've read a few of her books when I was getting started.

I'll echo what Gregg said about the position. It's the easiest thing to wrap your mind around, but it causes more problems than you think. A lot of the trick in an all css layout is understanding when you don't need to do anything. Sometimes all you need to do is stay out of the way and let things fall where they will. Usually it's only a few things here and there that need a float applied.

phanio
05-20-2009, 06:01 PM
Gregg, thanks will check the video out.

I really have not used very many tables - I like them for the side bars - but I think I know how to fix that without tables.

I started to re-design my pages and I am essentially just seeing where items fall - then trying to manipulate them with as little as poosible.

While I would prefer to use tables - kind of fits my personality - I also like efficiency - which means using the let amount of code.

Thanks for all the input - now my task is the output.

vangogh
05-20-2009, 06:33 PM
With the menus in the sidebars think lists instead of tables. I even wrote a couple of posts showing how a few years ago.

Simple Menus (http://www.vanseodesign.com/blog/css/simple-menus-with-xhtml-lists-and-css/) - vertical menus

Simple navigation bar (http://www.vanseodesign.com/blog/css/simple-navigation-bar-with-css-and-xhtml/) - horizontal menu bar

Both use simple lists for the html and then css to style them. You'll obviously need to adjust my code to suit your needs, but the basics of how to go about setting things up is in the posts.

phanio
05-20-2009, 09:39 PM
Vangogh,

That is good stuff - I was planning on using the display as block as well as lists - it was just easier at the time to use tables.

I was contemplating using this where I have two lists side by side - I was just going to put two divs side by side with lists in them. But, I think, using your example, can use several ULs inline to accomplish the same thing with out tables or divs.

Thanks for the info.

vangogh
05-21-2009, 12:41 AM
You can probably just use the lists or wrap divs around each. The trick is to float the outermost containing elements which will either be the <ul> or the <div>. You can try it without the <div>s first and see how it goes. If it doesn't work there's no problem wrapping each list in a div.

A lot of css layout is just seeing the page a little differently. Understand when you need a div, when you don't. Once you've done it a few times it gets so much easier to see. It's the first time or two that can trip you up.

phanio
05-21-2009, 06:54 PM
Thanks for the advice - I was able to create a couple of lists without using ULs or tables. Just used css to set them as blocks with padding and breaks - set everything in a div and it turned out great.

While this is a pain to learn - learning sure if fun - especailly when it all comes together.

vangogh
05-21-2009, 10:32 PM
I see how you set it up and it seems to be working. Try using lists (ul, ol, li) in the future. In the end it will be easier to work with them and it'll likely result in less code. Still look how far you've come from the tables you were using.

It can be a struggle to learn in the beginning, but every time you figure something out it does feel good doesn't it?

phanio
05-22-2009, 09:59 AM
While this has been a bit frustrating - it is fun learning new things.