Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Making a table with divs

Reply
Thread Tools

Making a table with divs

 
 
Paul B
Guest
Posts: n/a
 
      04-13-2006
I understand that using tables is not the 'correct' way to create a
webpage layout, so I wondered what the general consensus is on using
div tags to 'simulate' a table:
http://seventynine.net/testing/test01.html

It is a very very basic example but I'm sure anyone who has made a
layout with a table can see the point behind it.
 
Reply With Quote
 
 
 
 
rtconner
Guest
Posts: n/a
 
      04-13-2006
Uhm.. It doesn't work in IE.

And if you ask me, a table does the job just fine, so why would you try
to imitate a table when you can just use the actaul thing. And DIV have
many uses, but this, IMO is not one of them.

 
Reply With Quote
 
 
 
 
Barbara de Zoete
Guest
Posts: n/a
 
      04-13-2006
On Thu, 13 Apr 2006 23:07:11 +0200, Paul B <(E-Mail Removed)>
wrote:

> I understand that using tables is not the 'correct' way to create a
> webpage layout, so I wondered what the general consensus is on using
> div tags to 'simulate' a table:
> http://seventynine.net/testing/test01.html


If you really are serious about leaving tables as a method you use for
page layout, you should also let go of the 'concept of a table' that is in
your mind. This page is a lovely example of how the tables are something
that is very stuck in your head at the moment.

Create your content. Mark it up properly. That is a heading is a heading,
a paragraph is a paragraph, a table *is* a table. Et cetera. See what you
can do with all the elements you have in your page once it is marked up
properly. You possibly need one or two more handles (to seperate the main
content from, say, teh navigation meny), but you'll be amazed what you can
achieve with all there already is in your page.

> It is a very very basic example but I'm sure anyone who has made a
> layout with a table can see the point behind it.


There is no point actually. All those divs. Forget tables and start doing
things properly.


--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
 
Reply With Quote
 
Paul B
Guest
Posts: n/a
 
      04-13-2006
On 13 Apr 2006 14:12:52 -0700
"rtconner" <(E-Mail Removed)> wrote:

> Uhm.. It doesn't work in IE.
>
> And if you ask me, a table does the job just fine, so why would you
> try to imitate a table when you can just use the actaul thing. And
> DIV have many uses, but this, IMO is not one of them.
>


Ahh, I've not got IE. The table does do it fine but most people seem to
think the layout of a page shouldn't be done with a table so I was
thinking of a way to not use one... I think I'll just go back to
inventing square wheels for my car.
 
Reply With Quote
 
Good Man
Guest
Posts: n/a
 
      04-13-2006
Paul B <(E-Mail Removed)> wrote in news:20060413220711.3a2d7045
@pear.mshome.net:

> I understand that using tables is not the 'correct' way to create a
> webpage layout, so I wondered what the general consensus is on using
> div tags to 'simulate' a table:
> http://seventynine.net/testing/test01.html
>
> It is a very very basic example but I'm sure anyone who has made a
> layout with a table can see the point behind it.


You are correct in stating that using tables for webpage layout is not
preferred. However, tables are still the preferred choice in displaying
tabular data (ie: charts, etc)

I see what you're doing in your example, but I don't know how really
useful it is. Your code does indeed simulate a table using CSS.
However, a great deal of the 'exercise' in moving away from table-based
layout is moving away from the table-based *concept*, not just the table
tags themselves.

For example, if I only wanted content to appear in your 'cell' called
"Bottom right", there is no way I should be required to contemplate
anything else - i would use one div only, and use CSS to specify how I
want content presented/laid out.

Good exercise in scripting/simulating a table, but sort of missing the
concept of CSS itself in my humble opinion....



 
Reply With Quote
 
Good Man
Guest
Posts: n/a
 
      04-13-2006
"rtconner" <(E-Mail Removed)> wrote in news:1144962772.384111.295510
@z34g2000cwc.googlegroups.com:

> Uhm.. It doesn't work in IE.
>
> And if you ask me, a table does the job just fine, so why would you try
> to imitate a table when you can just use the actaul thing. And DIV have
> many uses, but this, IMO is not one of them.


hi, time to be bitchy...

what is your post referring to? you should quote posts that you are
replying to. it makes it much easier to understand and follow the thread.
 
Reply With Quote
 
rtconner
Guest
Posts: n/a
 
      04-13-2006
>hi, time to be bitchy...
>
>what is your post referring to? you should quote posts that you are
>replying to. it makes it much easier to understand and follow the thread.


sorry then. I don't post much and am not fully acquanted with proper
practice and proceedure. that was just a response to the original post.
show below.

>I understand that using tables is not the 'correct' way to create a
>webpage layout, so I wondered what the general consensus is on using
>div tags to 'simulate' a table:
>http://seventynine.net/testing/test01.html
>
>It is a very very basic example but I'm sure anyone who has made a
>layout with a table can see the point behind it.


 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      04-13-2006
Paul B wrote:
> I understand that using tables is not the 'correct' way to create a
> webpage layout, so I wondered what the general consensus is on using
> div tags to 'simulate' a table:
> http://seventynine.net/testing/test01.html
>
> It is a very very basic example but I'm sure anyone who has made a
> layout with a table can see the point behind it.


I am absolutely amazed how often this topic appears when it is so often
very well answered as in this thread. It does not seem to be to
difficult a concept to wrap ones mind around but yet the misconceptions
that *all* tables are bad persists!

<soapbox>
Okay maybe folks cannot recognized what the difference between tabular
data and layout framework is, so here it goes...

Tables are for tabular data, information that when organized in rows and
columns, where by such physical organization, has some purpose in
interpreting the data.

WORK OUTPUT
===========
CHIEFS
| 1 | 5 | 10 |
--+----+----+----+
10|100 | 15 | 5 |
--+----+----+----+
INDIANS 5| 85 | 25 | 3 |
--+----+----+----+
1| 65 | 50 | 0 |
--+----+----+----+

However if you are using a table to place a bit of data in a specific
location in the viewport, that is presentation! In this situation ask
yourself why do you want that bit of text there and I bet your answer
will be: "Cuz it looks good"! That *is* presentation!

Do *not* use a table to "hang" bits of your webpage's content in
specific places within the viewport. Use CSS. The real advantage of CSS
over tables becomes very clear when your decide later on that your do
not like your navbar on the upper left corner of your webpage but wish
it on the upper right, (Oh yes! Navbars are *NOT* tabular data, unless
the pages relate to say dates on a calender and the links are
understandably place in a table that resembles a page of a calender).

If you use a table you must edit your html (possible many many times
depending on how many pages are effected on your site) whereas if done
properly may only require one single change to a stylesheet to make the
change to your entire site!

Again to be clear: if you're using a table to place to bits here and
there on the page "'cuz it looks good"--STOP! If you are doing it to
arrange info in rows and columns because is has a "this vs. that"
relationship then by all means!
</soapbox>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      04-13-2006
In article <Xns97A4B0AC75108sonicyouth@216.196.97.131>,
Good Man <(E-Mail Removed)> wrote:

> "rtconner" <(E-Mail Removed)> wrote in news:1144962772.384111.295510
> @z34g2000cwc.googlegroups.com:
>
> > Uhm.. It doesn't work in IE.
> >
> > And if you ask me, a table does the job just fine, so why would you try
> > to imitate a table when you can just use the actaul thing. And DIV have
> > many uses, but this, IMO is not one of them.

>
> hi, time to be bitchy...
>
> what is your post referring to? you should quote posts that you are
> replying to. it makes it much easier to understand and follow the thread.


That is bitchy? You gentle lamb you...

--
dorayme
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      04-14-2006
To further the education of mankind, "rtconner" <(E-Mail Removed)>
declaimed:

> Uhm.. It doesn't work in IE.


What does?

> And if you ask me, a table does the job just fine, so why would you try
> to imitate a table when you can just use the actaul thing. And DIV have
> many uses, but this, IMO is not one of them.


Agreed.

--
Neredbojias
Infinity can have limits.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divs & Table Problem Notsoswuyd HTML 0 08-26-2009 04:33 PM
Problem laying out pages with divs or asp:table David ASP .Net 3 07-17-2009 03:17 PM
swapping divs -- when divs NOT positioned absolutely.. maya Javascript 4 11-16-2007 05:11 PM
Positioning divs, but WITHIN table cells? mj.redfox.mj@gmail.com HTML 2 11-23-2006 02:31 PM
Managing divs within divs.... rich HTML 0 02-02-2006 07:38 PM



Advertisments