Question about DIV instead of Table

N

nickolas80

Since layers are becoming the more widely accepted method of site
layout, I have a quesiton..

If you had some data that you wanted to display in this format:

DATA1 DATA2
DATA3 DATA4

Would each data be it's own DIV?
 
L

Luigi Donatello Asero

Since layers are becoming the more widely accepted method of site
layout, I have a quesiton..

If you had some data that you wanted to display in this format:

DATA1 DATA2
DATA3 DATA4

Would each data be it's own DIV?


But if we used DIV also for the data when should we still use tables?
Should we abolish them?

--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
https://www.scaiecat-spa-gigi.com/
 
D

David Dorward

If you had some data that you wanted to display in this format:
DATA1 DATA2
DATA3 DATA4
Would each data be it's own DIV?

That depends on what the data *is*. HTML is designed to describe semantics
and structure, not layout. Its impossible to say what markup should be
until you know what semantics and structure you are trying to describe.
 
T

Travis Newbury

Since layers are becoming the more widely accepted method of site
layout, I have a quesiton..

That statement is not true at all.
If you had some data that you wanted to display in this format:
DATA1 DATA2
DATA3 DATA4

That's what a table is for.
 
D

dingbat

Since layers are becoming the more widely accepted method of site
layout,

Layers have been obsolete for years.

If you had some data that you wanted to display in this format:

DATA1 DATA2
DATA3 DATA4

Would each data be it's own DIV?

They'd probably be in a <table> and each its own <td> If your "data"
has any reasonable claim to be "tabular", then just use the <table>
 
N

Neredbojias

With neither quill nor qualm, (e-mail address removed) quothed:
Since layers are becoming the more widely accepted method of site
layout, I have a quesiton..

If you had some data that you wanted to display in this format:

DATA1 DATA2
DATA3 DATA4

Would each data be it's own DIV?

That almost entirely depends on the data. At a guess, I'd say no, but
anything else on the page has an influence to the optimal layout, too.
 
L

Luigi Donatello Asero

Travis Newbury said:
That statement is not true at all.


That's what a table is for.

Fine.
So, do you think that the table on the page
https://www.scaiecat-spa-gigi.com/index.php
is appropriate or not?
The column on the left displays pictures and the one on the right displays a
text which is connected with these pictures.


--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
https://www.scaiecat-spa-gigi.com/
 
A

Arne

Once said:
Fine.
So, do you think that the table on the page
https://www.scaiecat-spa-gigi.com/index.php
is appropriate or not?
The column on the left displays pictures and the one on the right displays a
text which is connected with these pictures.

No, that is content layout that should be added with CSS and div's.

This is data, what tables are for:

/-----------------------------------------\
| | Average | Red |
| |-------------------| eyes |
| | height | weight | |
|-----------------------------------------|
| Males | 1.9 | 0.003 | 40% |
|-----------------------------------------|
| Females | 1.7 | 0.002 | 43% |
\-----------------------------------------/

Also this is data, suitable for a table:

TABELL S V O F +/- P
1. Syrianska IF 13 11 2 0 68 - 14 35
2. SS Gbg Jun 15 9 4 2 53 - 18 31
3. GIF Enosis 14 6 4 4 33 - 29 22
4. FC K-Pero 14 6 1 7 29 - 38 19
5. Skogshyddan 15 6 1 8 24 - 44 19
6. Real Maskin 13 4 4 5 24 - 35 16
7. BK Wobbler 14 4 2 8 16 - 38 14
8. Olskrokens 15 3 4 8 29 - 46 13
9. Käringöns FC 15 2 4 9 27 - 41 10
 
L

Luigi Donatello Asero

Arne said:
No, that is content layout that should be added with CSS and div's.

This is data, what tables are for:

/-----------------------------------------\
| | Average | Red |
| |-------------------| eyes |
| | height | weight | |
|-----------------------------------------|
| Males | 1.9 | 0.003 | 40% |
|-----------------------------------------|
| Females | 1.7 | 0.002 | 43% |
\-----------------------------------------/

Also this is data, suitable for a table:

TABELL S V O F +/- P
1. Syrianska IF 13 11 2 0 68 - 14 35
2. SS Gbg Jun 15 9 4 2 53 - 18 31
3. GIF Enosis 14 6 4 4 33 - 29 22
4. FC K-Pero 14 6 1 7 29 - 38 19
5. Skogshyddan 15 6 1 8 24 - 44 19
6. Real Maskin 13 4 4 5 24 - 35 16
7. BK Wobbler 14 4 2 8 16 - 38 14
8. Olskrokens 15 3 4 8 29 - 46 13
9. Käringöns FC 15 2 4 9 27 - 41 10

--


I think that this is the biggest question of all the ones which we have
discussed today.
The examples which you gave display data, no doubt about that.
But, as far as I remember, there had been someone else in this NG thinking
that even descriptions of photos are data.
Other contributions to this matter will be appreciated.
By the way, I changed from frames into tables into DIV and CSS..
--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
https://www.scaiecat-spa-gigi.com/
 
D

David Dorward

Luigi said:
But, as far as I remember, there had been someone else in this NG thinking
that even descriptions of photos are data.

They can be:

<thead>
<tr>
<th scope="col">Image</th>
<th scope="col">Caption</th>
</tr>
</thead>

*Generally* speaking, if you have at least two columns and can put a
(sensible) heading on all of them, then its tabular data.
 
J

Jonathan N. Little

David said:
Luigi Donatello Asero wrote:




They can be:

<thead>
<tr>
<th scope="col">Image</th>
<th scope="col">Caption</th>
</tr>
</thead>

*Generally* speaking, if you have at least two columns and can put a
(sensible) heading on all of them, then its tabular data.

+---DIV----+
| IMAGE |
| CAPTION |
+----------+

+---DIV----------+
| IMAGE |
| +----DIV-----+ |
| | CAPTION | |
| +------------+ |
| +----DIV-----+ |
| | More stuff | |
| | about image| |
| +------------+ |
+----------------+

more flexible
 
L

Luigi Donatello Asero

Jonathan N. Little said:
+---DIV----+
| IMAGE |
| CAPTION |
+----------+

+---DIV----------+
| IMAGE |
| +----DIV-----+ |
| | CAPTION | |
| +------------+ |
| +----DIV-----+ |
| | More stuff | |
| | about image| |
| +------------+ |
+----------------+

more flexible


Do you mean that both are so to say right but the second one is more
flexible?

--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
https://www.scaiecat-spa-gigi.com/
 
K

Keith

I know I'm late to the discussion, but thought I'd drop in.

Since layers are becoming the more widely accepted method of site
layout, I have a quesiton..

a div is not a layer and a layer is not a div. the layer tag went
bye-bye a while back. just want to clarify that. I hear people say that
all the time.
If you had some data that you wanted to display in this format:

DATA1 DATA2
DATA3 DATA4

Would each data be it's own DIV?

You could definitely do it that way if you wanted to, but for columnized
data, a table is still the better method. As others have pointed out,
that's what tables are for.
Using tables to arrange other elements on the page is what they should
not be used for anymore. Nested tables are harder to maintain and you
have less control over them.

- keith
 
R

ric

I have a problem, and I suspect DIV is the way to solve it, but I don'
know enough about it.

+--------+---------+---+---+---+---+
| | | th|umb|nai|ls |
| | +---+---+---+---+
| | | | | | |
| | +---+---+---+---+
| long | long | |
| image | image | changing |
| | | image when |
| | | thumbnails |
| | | rolled over |
| | | |
+--------+---------+---------------+
| |
| wide bottom image |
| |
+----------------------------------+


(Have a feeling the diagram won't format correctly, if so it can b
found 'here' (http://www.slunglow.org/image29.html).)

I started trying to use tables to structure the page above (each box
separate image), but as the content is graphical and gaps betwee
images are not acceptable, using tables (even with border="0
cellpadding="0" cellspacing="0") seem to leave white space betwee
elements (even more worrying is the fact that IE and Firefox seem to d
different things).

But if I don't use a table, then the page ends up with the 2 lon
images and the first row of 4 thumbnails in the right place, but the
the <BR> tag starts the second row of 4 thumbnails beneath the lon
images. And it all looks wrong from there...

I'm obviously not asking any of you helpful people to code my page fo
me (that would be laziness!), but can you point me in the righ
direction - is it DIV that I should be investigating?

Thanks in advance,

Ric

+-------------------------------------------------------------------
|Filename: Image29.jpg
|Download: http://www.highdots.com/forums/attachment.php?attachmentid=244
+-------------------------------------------------------------------
 
H

Hilarion

I started trying to use tables to structure the page above (each box a
separate image), but as the content is graphical and gaps between
images are not acceptable, using tables (even with border="0"
cellpadding="0" cellspacing="0") seem to leave white space between
elements (even more worrying is the fact that IE and Firefox seem to do
different things).


The cause of whitespace is a whitespace. What I mean is that you can not
enter any whitespace characters between opening tag of table cell and
image tag and also no whitespace characters between the image tag and
the table cell closing tag. You also have to make sure that you do not
specify margins or padding for your image tags or padding for table
cells (including inherited from rows and table).

I'm not encouraging you to use tables for layout purposes, but I do not
know now how to do it with DIV tags but I know (I think) what's causing
your gaps when using tables.


Hilarion
 
D

dorayme

From: ric said:
Organization: HighDots Forums
Newsgroups: alt.html
Date: Thu, 13 Oct 2005 12:14:07 +0200
Subject: Re: Question about DIV instead of Table


I have a problem, and I suspect DIV is the way to solve it, but I don't
know enough about it.

+--------+---------+---+---+---+---+
| | | th|umb|nai|ls |
| | +---+---+---+---+
| | | | | | |
| | +---+---+---+---+
| long | long | |
| image | image | changing |
| | | image when |
| | | thumbnails |
| | | rolled over |
| | | |
+--------+---------+---------------+
| |
| wide bottom image |
| |
+----------------------------------+


(Have a feeling the diagram won't format correctly, if so it can be
found 'here' (http://www.slunglow.org/image29.html).)

I started trying to use tables to structure the page above (each box a
separate image), but as the content is graphical and gaps between
images are not acceptable, using tables (even with border="0"
cellpadding="0" cellspacing="0") seem to leave white space between
elements (even more worrying is the fact that IE and Firefox seem to do
different things).

But if I don't use a table, then the page ends up with the 2 long
images and the first row of 4 thumbnails in the right place, but then
the <BR> tag starts the second row of 4 thumbnails beneath the long
images. And it all looks wrong from there...

I'm obviously not asking any of you helpful people to code my page for
me (that would be laziness!), but can you point me in the right
direction - is it DIV that I should be investigating?


Your asci appeared nicely on my email program (well done!). I
think you should give a URL of your attempts to "table" the
show. It may be that someone can help you improve it, someone
who might not have time or inclination to write a markup from
your asci diagram instructions... With the right styling,
tables might well do it. I would want to see your (unhappy)
effort first. Doubtless there would also be non table ways to do
it...

dorayme
 
R

ric

Thanks for your advice, both of you.

After reading Hilarion's post and initially discounting it, I've gon
back through my markup, and realised that you were (of course) righ
all along, and now have a working page. Some errant spaces ha
appeared in my markup due to using Dreamweaver and formatting the cod
to look pretty.

Not sure whether it's the best way to achieve the end, but it's don
the job for now.

Thanks for all your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top