How do I go about building this?

They have: 42 posts

Joined: Dec 2002

I finished my book on php and I feel confident enough to start the achitecture of my webpage. Normally I would build this particular design with a huge mess of tables, similar to how I made this site http://www.flatlanderwake.com but I've been told by members of this forum to keep tables to a minimum.

So how do I go about coding this http://www.chumpchange.org/other/layout_2.gif Like I said, I would normally slice it up into sections and use tables to put everything together. Please tell me anything you can, I'd like to get started today if possible.
Thank you

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

There is no rule that says to keep tables to a minimum. Most people actually have too few tables in their database. As a general rule any data that is repeated can be in a table by itself. Also group like objects in a table. Basically what you want to avoid is having duplicate data in a table.

It is hard to tell from your image about your database design. You might tell us more about the structure, categories, products, names and addresses, etc. so that we can help you further.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

er... I think he means HTML tables.

If you're interested in learning how to use CSS for positioning, there are a number of good articles and examples at alistapart.com and in our forums (search for "CSS positioning" or "CSS layout").

They have: 42 posts

Joined: Dec 2002

Yes I am refering to html tables here.

So is the basic layout done with tables or with CSS? I have used CSS to position before but doesn't that only work with certain browsers?

Should I be using tables at all for layout?

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

With the way your pages are designed you're probably going to need tables. Designing with CSS really involves a change in how you go about designing in the first place. Thinking more in terms of elements on the page rather than a sliced graphic.

This is something you might want to experiment with a little bit before you get going with it full force - it's quite a change from the old table-based way of doing things.

Busy's picture

He has: 6,151 posts

Joined: May 2001

Since your already starting on one new venture I'd stick with tables (nothing wrong with tables anyway) while you learn PHP etc then later on, learn CSS and convert the site (not that you'd need to).
The thing with tables is they have been abused a lot, when I say abused I mean used badly, nesting tables is ok and a good way of displaying stuff but when you start nesting nested tables inside nested tables you start getting into all sorts of problems, from trying to edit the right table, to slow loading times, to alignment problems. and to think one little (") can throw the whole thing out.
Forums and message boards are al tables, I havent seen one yet that doesnt use tables.

He has: 1,380 posts

Joined: Feb 2002

keep in mind that CSS positioning isnt supported across the board

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Well, actually, CSS positioning IS supported across the board, barring some NOW OUT OF DATE BROWSERS!

However, there is nothing wrong with using tables for layout when needed (and of course for data). I agree with Megan and Busy that this particular design would indicate tables rather than CSS positioning would be easiest.

They have: 42 posts

Joined: Dec 2002

Ok thanks for the replies. I have decided to use tables as I am very familiar with them and I already know how to use them to create this project. After I finish my advanced PHP book,I am going to start learning CSS.

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

Quote: Originally posted by Suzanne
er... I think he means HTML tables.

If you're interested in learning how to use CSS for positioning, there are a number of good articles and examples at alistapart.com and in our forums (search for "CSS positioning" or "CSS layout").

Er, you can tell where my mind has been all day. Greping through some code and designing a db.

Anyway the answer is quite similar. Only use what you need to use. I nearly always use nested tables. They work quite well if you know how to use them. The only problem that I have ever encountered is someone trying to open a page in MS Word97. It groaned about nested tables. As a general rule for a site with a left navbar, I would have one table at the top for the logo and stuff. One nested table for the middle stuff consisting of a table at 100%, a table for the navbar, a table for the middle content, and a blank table to force the alignment. Then usually a table at the bottom.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.