Question about DIV instead of Table

Discussion in 'HTML' started by nickolas80@gmail.com, Sep 21, 2005.

  1. Guest

    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?
     
    , Sep 21, 2005
    #1
    1. Advertising

  2. <> skrev i meddelandet
    news:...
    > 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/
     
    Luigi Donatello Asero, Sep 21, 2005
    #2
    1. Advertising

  3. wrote:

    > 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.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Sep 21, 2005
    #3
  4. wrote:
    > 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.

    --
    -=tn=-
     
    Travis Newbury, Sep 21, 2005
    #4
  5. Guest

    wrote:
    > 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>
     
    , Sep 21, 2005
    #5
  6. Neredbojias Guest

    With neither quill nor qualm, 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.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
     
    Neredbojias, Sep 21, 2005
    #6
  7. "Travis Newbury" <> skrev i meddelandet
    news:lX8Ye.767$...
    > wrote:
    > > 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.


    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/
     
    Luigi Donatello Asero, Sep 21, 2005
    #7
  8. Arne Guest

    Once upon a time *Luigi Donatello Asero* wrote:
    > "Travis Newbury" <> skrev i meddelandet
    > news:lX8Ye.767$...
    >> wrote:
    >> > 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.

    >
    > 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

    --
    /Arne
    Now killing all posts originating at GoogleGroups
    Workaround: http://www.safalra.com/special/googlegroupsreply/
     
    Arne, Sep 21, 2005
    #8
  9. "Arne" <> skrev i meddelandet
    news:...
    > Once upon a time *Luigi Donatello Asero* wrote:
    > > "Travis Newbury" <> skrev i meddelandet
    > > news:lX8Ye.767$...
    > >> wrote:
    > >> > 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.

    > >
    > > 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
    >
    > --



    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/
     
    Luigi Donatello Asero, Sep 21, 2005
    #9
  10. Luigi Donatello Asero wrote:

    > 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.


    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Sep 21, 2005
    #10
  11. David Dorward wrote:

    > Luigi Donatello Asero wrote:
    >
    >
    >>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.
    >
    >


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

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

    more flexible

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Sep 21, 2005
    #11
  12. "Jonathan N. Little" <> skrev i meddelandet
    news:BLhYe.1530$...
    > David Dorward wrote:
    >
    > > Luigi Donatello Asero wrote:
    > >
    > >
    > >>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.
    > >
    > >

    >
    > +---DIV----+
    > | IMAGE |
    > | CAPTION |
    > +----------+
    >
    > +---DIV----------+
    > | IMAGE |
    > | +----DIV-----+ |
    > | | CAPTION | |
    > | +------------+ |
    > | +----DIV-----+ |
    > | | More stuff | |
    > | | about image| |
    > | +------------+ |
    > +----------------+
    >
    > more flexible
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com



    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/
     
    Luigi Donatello Asero, Sep 21, 2005
    #12
  13. Luigi Donatello Asero wrote:

    > "Jonathan N. Little" <> skrev i meddelandet
    > news:BLhYe.1530$...
    >
    >>David Dorward wrote:
    >>
    >>
    >>>Luigi Donatello Asero wrote:
    >>>
    >>>
    >>>
    >>>>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.
    >>>
    >>>

    >>
    >>+---DIV----+
    >>| IMAGE |
    >>| CAPTION |
    >>+----------+
    >>
    >>+---DIV----------+
    >>| IMAGE |
    >>| +----DIV-----+ |
    >>| | CAPTION | |
    >>| +------------+ |
    >>| +----DIV-----+ |
    >>| | More stuff | |
    >>| | about image| |
    >>| +------------+ |
    >>+----------------+
    >>
    >>more flexible
    >>
    >>--
    >>Take care,
    >>
    >>Jonathan
    >>-------------------
    >>LITTLE WORKS STUDIO
    >>http://www.LittleWorksStudio.com

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

    Either. Use of DIVs more flexible than table.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Sep 22, 2005
    #13
  14. Keith Guest

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

    wrote:
    > 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
     
    Keith, Sep 24, 2005
    #14
  15. ric Guest

    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
    +-------------------------------------------------------------------

    --
    ri
    -----------------------------------------------------------------------
    ric's Profile: http://www.highdots.com/forums/m104
    View this thread: http://www.highdots.com/forums/t293565
     
    ric, Oct 13, 2005
    #15
  16. Hilarion Guest

    > 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
     
    Hilarion, Oct 13, 2005
    #16
  17. dorayme Guest

    > From: ric <>
    > 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
     
    dorayme, Oct 14, 2005
    #17
  18. ric Guest

    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

    --
    ri
    -----------------------------------------------------------------------
    ric's Profile: http://www.highdots.com/forums/m104
    View this thread: http://www.highdots.com/forums/t293565
     
    ric, Oct 16, 2005
    #18
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rio
    Replies:
    4
    Views:
    1,228
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    790
  3. jc
    Replies:
    10
    Views:
    3,728
    Kevin Scholl
    Jun 30, 2009
  4. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    219
    David Dorward
    Jun 1, 2005
  5. mscir
    Replies:
    3
    Views:
    343
    Martin Honnen
    Jun 26, 2005
Loading...

Share This Page