Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DIV vs TABLE

Reply
Thread Tools

DIV vs TABLE

 
 
Mantorok
Guest
Posts: n/a
 
      04-24-2006
Hi all

I heard recently that using DIVs instead of Tables for laying out your page
was the way forward.

Can anyone give me a good reason why I should use DIVs, I think they're are
pain in the backside personally and can never really get my head around
them.

What are the advantages? Do I HAVE to use them? If so, why? How will it
affect any new sites I develop?

Thanks all
Kev


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      04-24-2006
Just pick what fits your needs. An advantage for DIVs is that it allows to
reorder columns when using a column layout.

Try for example :
http://www.csszengarden.com/

I admit it's likely overkill for us mere mortals...

--
Patrice

"Mantorok" <(E-Mail Removed)> a écrit dans le message de news:
e2i588$47k$(E-Mail Removed)...
> Hi all
>
> I heard recently that using DIVs instead of Tables for laying out your
> page was the way forward.
>
> Can anyone give me a good reason why I should use DIVs, I think they're
> are pain in the backside personally and can never really get my head
> around them.
>
> What are the advantages? Do I HAVE to use them? If so, why? How will it
> affect any new sites I develop?
>
> Thanks all
> Kev
>



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      04-24-2006
Tables are still quite acceptable for displaying layout elements that are in
a tabular layout format, and in fact can be better than divs with such
layout. However, divs are more flexible for the same reason - they do not
restrict the layout to tabular format. Instead, a div is like a "floating
box" that can beo positioned anywhere you want. Patrice's linke to
csszengarden.com is the best example I know of regarding the power of divs
for layout. Every page is the same content with a different style sheet
applied.

This means that you can change the look of your web pages without touching
any of the content.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"Mantorok" <(E-Mail Removed)> wrote in message
news:e2i588$47k$(E-Mail Removed)...
> Hi all
>
> I heard recently that using DIVs instead of Tables for laying out your
> page was the way forward.
>
> Can anyone give me a good reason why I should use DIVs, I think they're
> are pain in the backside personally and can never really get my head
> around them.
>
> What are the advantages? Do I HAVE to use them? If so, why? How will it
> affect any new sites I develop?
>
> Thanks all
> Kev
>



 
Reply With Quote
 
Mantorok
Guest
Posts: n/a
 
      04-24-2006
Ok thanks.

I find divs a nightmare though - is there actually any good guides/help on
how to use them?

If I was to produce a site without using DIVs - will it bite me on the arse
later on in life?

Thanks
Kev

"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:%23Fq2G%(E-Mail Removed)...
> Tables are still quite acceptable for displaying layout elements that are
> in a tabular layout format, and in fact can be better than divs with such
> layout. However, divs are more flexible for the same reason - they do not
> restrict the layout to tabular format. Instead, a div is like a "floating
> box" that can beo positioned anywhere you want. Patrice's linke to
> csszengarden.com is the best example I know of regarding the power of divs
> for layout. Every page is the same content with a different style sheet
> applied.
>
> This means that you can change the look of your web pages without touching
> any of the content.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Professional Numbskull
>
> Hard work is a medication for which
> there is no placebo.
>
> "Mantorok" <(E-Mail Removed)> wrote in message
> news:e2i588$47k$(E-Mail Removed)...
>> Hi all
>>
>> I heard recently that using DIVs instead of Tables for laying out your
>> page was the way forward.
>>
>> Can anyone give me a good reason why I should use DIVs, I think they're
>> are pain in the backside personally and can never really get my head
>> around them.
>>
>> What are the advantages? Do I HAVE to use them? If so, why? How will it
>> affect any new sites I develop?
>>
>> Thanks all
>> Kev
>>

>
>



 
Reply With Quote
 
Mantorok
Guest
Posts: n/a
 
      04-24-2006
"Eliyahu Goldin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I think this famous site makes it clear. If you are more a designer than a
>programmer, go for divs with css. If you are more a programmer, stick with
>the tables and leave the divs for the designers.


That sounds good to me

As long as by using tables I won't be giving myself enough rope......then I
don't mind.

Kev


 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      04-24-2006
Do you mind changing the HTML code in case you would update your design or
would you like to have third party (or yourself) to be able to change the
layout using only a CSS stylesheet (themes).

If yes, using DIVs and CSS will give more flexibility but is likely a bit
logner to implement depneidng on what exactly you are trying to do, else you
can keep using tables...

--
Patrice

"Mantorok" <(E-Mail Removed)> a écrit dans le message de news:
e2idqd$8q7$(E-Mail Removed)...
> Ok thanks.
>
> I find divs a nightmare though - is there actually any good guides/help on
> how to use them?
>
> If I was to produce a site without using DIVs - will it bite me on the
> arse later on in life?
>
> Thanks
> Kev
>
> "Kevin Spencer" <(E-Mail Removed)> wrote in message
> news:%23Fq2G%(E-Mail Removed)...
>> Tables are still quite acceptable for displaying layout elements that are
>> in a tabular layout format, and in fact can be better than divs with such
>> layout. However, divs are more flexible for the same reason - they do not
>> restrict the layout to tabular format. Instead, a div is like a "floating
>> box" that can beo positioned anywhere you want. Patrice's linke to
>> csszengarden.com is the best example I know of regarding the power of
>> divs for layout. Every page is the same content with a different style
>> sheet applied.
>>
>> This means that you can change the look of your web pages without
>> touching any of the content.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> Professional Numbskull
>>
>> Hard work is a medication for which
>> there is no placebo.
>>
>> "Mantorok" <(E-Mail Removed)> wrote in message
>> news:e2i588$47k$(E-Mail Removed)...
>>> Hi all
>>>
>>> I heard recently that using DIVs instead of Tables for laying out your
>>> page was the way forward.
>>>
>>> Can anyone give me a good reason why I should use DIVs, I think they're
>>> are pain in the backside personally and can never really get my head
>>> around them.
>>>
>>> What are the advantages? Do I HAVE to use them? If so, why? How will it
>>> affect any new sites I develop?
>>>
>>> Thanks all
>>> Kev
>>>

>>
>>

>
>



 
Reply With Quote
 
Darrel
Guest
Posts: n/a
 
      04-24-2006
> I find divs a nightmare though - is there actually any good guides/help on
> how to use them?


They're only a nightmare if you have to deal with IE.

Actually, DIVs/CSS aren't THAT difficult...it's just that we've all 'grown
up' using Tables, so it's different.

> If I was to produce a site without using DIVs - will it bite me on the
> arse later on in life?


I doubt it.

But, the sooner you learn and deal with them, the more confident you'll be
when you make decisions as to which one to use.

-Darrel


 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      04-24-2006
I think this famous site makes it clear. If you are more a designer than a
programmer, go for divs with css. If you are more a programmer, stick with
the tables and leave the divs for the designers.

Eliyahu

"Patrice" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Just pick what fits your needs. An advantage for DIVs is that it allows to
> reorder columns when using a column layout.
>
> Try for example :
> http://www.csszengarden.com/
>
> I admit it's likely overkill for us mere mortals...
>
> --
> Patrice
>
> "Mantorok" <(E-Mail Removed)> a écrit dans le message de news:
> e2i588$47k$(E-Mail Removed)...
>> Hi all
>>
>> I heard recently that using DIVs instead of Tables for laying out your
>> page was the way forward.
>>
>> Can anyone give me a good reason why I should use DIVs, I think they're
>> are pain in the backside personally and can never really get my head
>> around them.
>>
>> What are the advantages? Do I HAVE to use them? If so, why? How will it
>> affect any new sites I develop?
>>
>> Thanks all
>> Kev
>>

>
>



 
Reply With Quote
 
Erik Funkenbusch
Guest
Posts: n/a
 
      04-24-2006
On Mon, 24 Apr 2006 10:21:37 +0100, Mantorok wrote:

> Hi all
>
> I heard recently that using DIVs instead of Tables for laying out your page
> was the way forward.


Yes and no.

> Can anyone give me a good reason why I should use DIVs, I think they're are
> pain in the backside personally and can never really get my head around
> them.
>
> What are the advantages? Do I HAVE to use them? If so, why? How will it
> affect any new sites I develop?


No, you don't HAVE to do much of anything. However, good web design
specifies seperating content from presentation. That is, seperating the
actual text of your site from it's layout and style.

Tables have many problems, including being more difficult for those with
disabilities to read, as well as making it more difficult for search
engines to find relevant information.

div/css based sites tend to get better page ranks in google and other
crawlers because the site is "semantically" relevant. That is, you've
tagged parts of your page with bits of information that defines its
importance, such as using h1/h2/h3 tags, etc...

Nothing is preventing you from designing sites as you always have, and 95%
of your audience will probably never care. But if you want to be
accessible to those with disabilities (a requirement for government and
educational sites, and a growing requirement for corporations - see the
Target Companies lawsuit), then semantic design is the way to go.

Another benefit is that div/css based sites tend to use a lot less
bandwidth, which can save you real money if you pay per megabyte for your
hosting.
 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      04-24-2006
The only thing you'll do is make it harder to change the layout in the
future.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"Mantorok" <(E-Mail Removed)> wrote in message
news:e2iepa$9es$(E-Mail Removed)...
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I think this famous site makes it clear. If you are more a designer than a
>>programmer, go for divs with css. If you are more a programmer, stick with
>>the tables and leave the divs for the designers.

>
> That sounds good to me
>
> As long as by using tables I won't be giving myself enough rope......then
> I don't mind.
>
> Kev
>



 
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
Hiding part of table dynamically with javascript - IE6 does notsupport div inside table. jc HTML 10 06-30-2009 07:24 PM
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
All browsers are cool but IE: div, form, table, input.. where's the table? Sundew Shin Javascript 5 06-02-2006 02:21 AM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM



Advertisments