Learning CSS for layout
- Started
- Last post
- 28 Responses
- monoboy
How long did it take some of you guys to master using CSS for site layout?
All I've got to go on is an Eric Meyer Book and a tight deadline. feeling rather sorry for myself.
- MX_OnD0
never a good idea.
Take your time with a "test project".
- foreign0
are you doing a transitional layout or pure css?
- MX_OnD0
are you doing a transitional layout or pure css?
foreign
(Jun 21 05, 04:23)No™
NEVER combine tables and divs unless the table is used to hold tabular data.
- foreign0
No™
NEVER combine tables and divs unless the table is used to hold tabular data.
MX_OnD
(Jun 21 05, 04:24)geek. :P
there's not always time, it's not always possible to do pure css layouts.
- UndoUndo0
I would advise reading on how IE and other browsers interperet CSS differently and the hacks you have to do for less stressful living
- MX_OnD0
geek. :P
wrong. You lose the benefit if you mix and match, you're bound by the lowest common denominator.
there's not always time, it's not always possible to do pure css layouts.
wrong again. With practise you're faster and can re-use lots of styles in other projects.
- monoboy0
I started off down the pure css path but it's making my head hurt.
Is a combination the way to go, I've got so used to complicated nested tables for accurate layout. CSS is just all over the place.
- foreign0
btw, monoboy, it took me a few weeks to get my head around css layouts, been using it for 8 months and i haven't mastered it. pure css layouts takes time and are always a challenge and like undoundo said you need experience and knowledge of all the quirks otherwise it's going to get really frustrating, esp. if you have a deadline.
- foreign0
did you just read that somewhere or do you do pure css layouts every time?
- UndoUndo0
eh? MX which wrong was I? :)
- foreign0
I started off down the pure css path but it's making my head hurt.
Is a combination the way to go, I've got so used to complicated nested tables for accurate layout. CSS is just all over the place.
monoboy
(Jun 21 05, 04:36)if you want to use transitional layout, don't use nested tables. use css for that. but you can use a few basic tables to lay out the main structure of the page
- UndoUndo0
DW has layouts available form its templates section in File>New. A good place to start
- MX_OnD0
did you just read that somewhere or do you do pure css layouts every time?
foreign
(Jun 21 05, 04:39)I use pure CSS every time.
No need for a cheap little dig like "did you just read that somewhere"
But if that's the way YOU want it then post your phone number...
I've got a special message for the likes of you.
- MX_OnD0
eh? MX which wrong was I? :)
UndoUndo
(Jun 21 05, 04:39)neither, both were foreign's comments.
- UndoUndo0
post the number!!
- foreign0
I've got a special message for the likes of you.
MX_OnD
(Jun 21 05, 04:44)time to take a break, dude.
- fate_redux0
I never got the whole "tubular data" crap. Text is text, images are images. It only matters what they look like when rendered across platforms and browsers. Not the "ideals" behind the code.
- foreign0
css nazi... lol.
- MX_OnD0
time to take a break, dude.
foreign
(Jun 21 05, 04:51)css nazi... lol.
foreign
(Jun 21 05, 04:54)for real, post the number.
- runDMB0
CSS for layout is easier than you'd think. I started using it a year or so ago for page structure and it makes most things very simple.
It can actually be pixel perfect and cross-browser. It also makes it very easy to build dynamic sites.
Obviously it's a bonus if you can get away with targeting newish browsers as you don't have to employ so many hacks to hold things together. Firefox and IE6 handle most stuff pretty well (building your experience up will help you learn how to overcome the few oddities that they throw up in terms of how certain things are rendered).
The best thing is just how little code is required on the page to produce pretty complex layouts that can be tweaked and farted about with to your hearts content without clunking table cells all over the place. What a lot of people forget is that with a correctly structured page you can effectively completely redesign a site just by altering the style sheet.
For a great book I can heartily recommend the Zeldman book, "Designing with web standards" as a starting point. It's very easy to follow, particularly if you already use CSS aspects of your site other than layout.
Ultimately, it looks like browsers will increasingly adopt these standards in the future so if you get an understanding now, your sites are always going to work and (hopefully) look good in the future.
It'll take you a week or so to start doing some good stuff, maybe less.