473,508 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1766
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6576
by: Gaz | last post by:
Hi, I need to have a table nested within another table. The tables are alongside each other visually speaking, and the nested table (on the right) can vary in size. My problem is that when the...
61
24397
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
3
11346
by: Terrence Brannon | last post by:
I don't know what Postgres considers a relation and had no intention of creating one when piping my schema to it... I always DROP TABLE before CREATE TABLE, so here are the ERRORS emitted when...
4
15797
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
4
548
by: Simone Battagliero | last post by:
I wrote a program which inserts and finds elements in an hash table. Each element of the table is a dinamic list, which holds all elements having the same hash value (calculated by an int...
117
18411
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
76
271459
MMcCarthy
by: MMcCarthy | last post by:
Normalisation is the term used to describe how you break a file down into tables to create a database. There are 3 or 4 major steps involved known as 1NF (First Normal Form), 2NF (Second Normal...
7
4797
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
5
3815
by: wugon.net | last post by:
question: db2 LUW V8 UNION ALL with table function month() have bad query performance Env: db2 LUW V8 + FP14 Problem : We have history data from 2005/01/01 ~ 2007/05/xx in single big...
5
4902
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
7226
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7328
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7049
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5631
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3199
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.