471,122 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,122 software developers and data experts.

Table or Div

Table or Div

Is there a common rule or "best practice" concerning when to use TABLE and
when to use DIV tag's when designing a master page? I am designing a master
page with a header and footer and in between I have a menu area to the left
and a content area to the right. What would be the best way to design this
page?

TIRislaa
Jan 24 '07 #1
4 1683
go div every time is my rule, layout with tables is hard work...but you cant
beat tables for backward compatibility so theres no right or wrong way! If
your into seperation of the html and the presentation through CSS then its
often seen as best practivc to use divs and css for layout and style as
opposed to tables and css, or nested styles and fonts for example.

.....theres a thread a few threads down entitled "2 divs on same line" - go
take a read of how to lay out what your after using master pages

--
--
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Tor Inge Rislaa" <to************@rislaa.nowrote in message
news:u0**************@TK2MSFTNGP05.phx.gbl...
Table or Div

Is there a common rule or "best practice" concerning when to use TABLE and
when to use DIV tag's when designing a master page? I am designing a
master page with a header and footer and in between I have a menu area to
the left and a content area to the right. What would be the best way to
design this page?

TIRislaa


Jan 24 '07 #2
Thank you!

"John Timney (MVP)" <x_****@timney.eclipse.co.ukskrev i melding
news:i6******************************@eclipse.net. uk...
go div every time is my rule, layout with tables is hard work...but you
cant beat tables for backward compatibility so theres no right or wrong
way! If your into seperation of the html and the presentation through CSS
then its often seen as best practivc to use divs and css for layout and
style as opposed to tables and css, or nested styles and fonts for
example.

....theres a thread a few threads down entitled "2 divs on same line" - go
take a read of how to lay out what your after using master pages

--
--
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Tor Inge Rislaa" <to************@rislaa.nowrote in message
news:u0**************@TK2MSFTNGP05.phx.gbl...
>Table or Div

Is there a common rule or "best practice" concerning when to use TABLE
and when to use DIV tag's when designing a master page? I am designing a
master page with a header and footer and in between I have a menu area to
the left and a content area to the right. What would be the best way to
design this page?

TIRislaa



Jan 24 '07 #3

"Tor Inge Rislaa" <to************@rislaa.nowrote in message
news:u0**************@TK2MSFTNGP05.phx.gbl...
Table or Div
Is there a common rule or "best practice" concerning when to use TABLE and
when to use DIV tag's when designing a master page? I am designing a
master page with a header and footer and in between I have a menu area to
the left and a content area to the right. What would be the best way to
design this page?
Yep, as John recommends, go with divs. Apart from the "semantic web" reason
that John touched on, if you ever need help on a CSS matter and post a URL
to a page laid out using tables in a CSS newsgroup, you will get absolutely
slaughtered by the regulars there.

Not that that has ever happened to me, of course....

Mike
Jan 24 '07 #4
I tend to mix and match tables and divs. Each has their place. Because a div
is a block-level element, it is designed to either appear in the normal flow
of the page on a line by itself, or using absolute positioning
("layer-style"). Doing layout elements. such as 2 rectangles that should
always be side-by-side, using divs is, as the "2 divs on same line" thread
points up, problematic. However, tables, which are also block-level
elements, but may contain many boxes in the same row, are by nature fixed
internally. There is no easy way to change the internal layout of rows and
columns inside tables. So, when doing boxes as containers, divs are the
perfect tool, while using tables is perfect for doing multiple boxes that
are tabular relative to one another.

Tables have their CSS issues, of course, but many of these can be solved by
putting a table inside a div when necessary. However, I certainly would not
use a table or tables for doing general layout.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

In case of Minimalism, break Philip Glass.

"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:i6******************************@eclipse.net. uk...
go div every time is my rule, layout with tables is hard work...but you
cant beat tables for backward compatibility so theres no right or wrong
way! If your into seperation of the html and the presentation through CSS
then its often seen as best practivc to use divs and css for layout and
style as opposed to tables and css, or nested styles and fonts for
example.

....theres a thread a few threads down entitled "2 divs on same line" - go
take a read of how to lay out what your after using master pages

--
--
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Tor Inge Rislaa" <to************@rislaa.nowrote in message
news:u0**************@TK2MSFTNGP05.phx.gbl...
>Table or Div

Is there a common rule or "best practice" concerning when to use TABLE
and when to use DIV tag's when designing a master page? I am designing a
master page with a header and footer and in between I have a menu area to
the left and a content area to the right. What would be the best way to
design this page?

TIRislaa



Jan 25 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

61 posts views Thread by Toby Austin | last post: by
3 posts views Thread by Terrence Brannon | last post: by
4 posts views Thread by maricel | last post: by
4 posts views Thread by Simone Battagliero | last post: by
117 posts views Thread by phil-news-nospam | last post: by
7 posts views Thread by Kamal | last post: by
5 posts views Thread by jrod11 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.