472,784 Members | 1,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,784 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 1734
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
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
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
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
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
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
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
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
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
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
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.