Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Layout: Divs or Tables?

Reply
Thread Tools

Layout: Divs or Tables?

 
 
=?Utf-8?B?Tkg=?=
Guest
Posts: n/a
 
      03-14-2007
Hi,

What do you recommend for defining the layout of an asp.net 2.0 page?
Leaving masterpages and user controls aside for the moment is the use of
tables or Divs the best approach?

I have been using tables so far to define the layout and use % based sizes
so things stretch or shrink to fit the screen size. It works fine.

I read about using DIVs and saw this approach being used in some MS Asp.net
design templates. They use divs and use CSS to handle the layout.

Which is best, does it matter at all?
 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      03-14-2007
To be honest, I prefer the table approach. You can do great things with CSS
positioning, but it can be easy to create strange visual errors. Not to
mention that it always seems that after you design with CSS there's at least
one browser you didn't check with that has a visual error

I like to use the tables for the general structure and often rely on the
divs if I need something special, such as hideable text through javascript,
etc.. I still use CSS in my app, I've just kept away from the absolute
positioning as it just seems to take so much time to get it right compared
to tables.


--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"NH" <> wrote in message
news2821A44-4C66-44D4-AE9C-...
> Hi,
>
> What do you recommend for defining the layout of an asp.net 2.0 page?
> Leaving masterpages and user controls aside for the moment is the use of
> tables or Divs the best approach?
>
> I have been using tables so far to define the layout and use % based sizes
> so things stretch or shrink to fit the screen size. It works fine.
>
> I read about using DIVs and saw this approach being used in some MS
> Asp.net
> design templates. They use divs and use CSS to handle the layout.
>
> Which is best, does it matter at all?



 
Reply With Quote
 
 
 
 
=?Utf-8?B?Tkg=?=
Guest
Posts: n/a
 
      03-14-2007
I agree about the absolute positioning, I remember the first web app I built
in asp.net 1.0 and used the gridlayout option on the page. I thought it was
great until I viewed the web page from a different users monitior that had a
different display resolution.

I suppose you learn from your mistakes.

"Mark Fitzpatrick" wrote:

> To be honest, I prefer the table approach. You can do great things with CSS
> positioning, but it can be easy to create strange visual errors. Not to
> mention that it always seems that after you design with CSS there's at least
> one browser you didn't check with that has a visual error
>
> I like to use the tables for the general structure and often rely on the
> divs if I need something special, such as hideable text through javascript,
> etc.. I still use CSS in my app, I've just kept away from the absolute
> positioning as it just seems to take so much time to get it right compared
> to tables.
>
>
> --
> Hope this helps,
> Mark Fitzpatrick
> Former Microsoft FrontPage MVP 199?-2006
>
> "NH" <> wrote in message
> news2821A44-4C66-44D4-AE9C-...
> > Hi,
> >
> > What do you recommend for defining the layout of an asp.net 2.0 page?
> > Leaving masterpages and user controls aside for the moment is the use of
> > tables or Divs the best approach?
> >
> > I have been using tables so far to define the layout and use % based sizes
> > so things stretch or shrink to fit the screen size. It works fine.
> >
> > I read about using DIVs and saw this approach being used in some MS
> > Asp.net
> > design templates. They use divs and use CSS to handle the layout.
> >
> > Which is best, does it matter at all?

>
>
>

 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      03-14-2007
This topic was discussed numerous times in this newsgroup. The conclusion
was if you're more a programmer, tables let you create a robust and
reasonably good design fast. If you're more a designer, you can express
yourself more with divs provided you learnt well how to use them properly.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"NH" <> wrote in message
news2821A44-4C66-44D4-AE9C-...
> Hi,
>
> What do you recommend for defining the layout of an asp.net 2.0 page?
> Leaving masterpages and user controls aside for the moment is the use of
> tables or Divs the best approach?
>
> I have been using tables so far to define the layout and use % based sizes
> so things stretch or shrink to fit the screen size. It works fine.
>
> I read about using DIVs and saw this approach being used in some MS
> Asp.net
> design templates. They use divs and use CSS to handle the layout.
>
> Which is best, does it matter at all?



 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      03-14-2007
"Mark Fitzpatrick" <> wrote in message
news:ex$1$...

> To be honest, I prefer the table approach. You can do great things with
> CSS positioning, but it can be easy to create strange visual errors. Not
> to mention that it always seems that after you design with CSS there's at
> least one browser you didn't check with that has a visual error
>
> I like to use the tables for the general structure and often rely on the
> divs if I need something special, such as hideable text through
> javascript, etc.. I still use CSS in my app, I've just kept away from the
> absolute positioning as it just seems to take so much time to get it right
> compared to tables.


Me too.

CSS layout suddenly became fashionable about a year ago, which made it
proponents sneer at us poor dummies who still used tables for layout...


 
Reply With Quote
 
Peter Bradley
Guest
Posts: n/a
 
      03-14-2007
And CSS positioning allows you to conform to Accessibility Guidelines -
which may be a legal requirement on you. You can't do that with tables as
they produce garbage through a screen reader.

Just my 2c.


Peter

"Eliyahu Goldin" <> wrote in
message news:...
> This topic was discussed numerous times in this newsgroup. The conclusion
> was if you're more a programmer, tables let you create a robust and
> reasonably good design fast. If you're more a designer, you can express
> yourself more with divs provided you learnt well how to use them properly.
>
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "NH" <> wrote in message
> news2821A44-4C66-44D4-AE9C-...
>> Hi,
>>
>> What do you recommend for defining the layout of an asp.net 2.0 page?
>> Leaving masterpages and user controls aside for the moment is the use of
>> tables or Divs the best approach?
>>
>> I have been using tables so far to define the layout and use % based
>> sizes
>> so things stretch or shrink to fit the screen size. It works fine.
>>
>> I read about using DIVs and saw this approach being used in some MS
>> Asp.net
>> design templates. They use divs and use CSS to handle the layout.
>>
>> Which is best, does it matter at all?

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      03-14-2007
I'm afraid it won't help much as my personal preference is to use DIVs
whenever possible but I still use TABLEs for layout when significantly
easier/faster.

"NH" <> a écrit dans le message de news:
D2821A44-4C66-44D4-AE9C-...
> Hi,
>
> What do you recommend for defining the layout of an asp.net 2.0 page?
> Leaving masterpages and user controls aside for the moment is the use of
> tables or Divs the best approach?
>
> I have been using tables so far to define the layout and use % based sizes
> so things stretch or shrink to fit the screen size. It works fine.
>
> I read about using DIVs and saw this approach being used in some MS
> Asp.net
> design templates. They use divs and use CSS to handle the layout.
>
> Which is best, does it matter at all?



 
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
swapping divs -- when divs NOT positioned absolutely.. maya Javascript 4 11-16-2007 05:11 PM
Managing divs within divs.... rich HTML 0 02-02-2006 07:38 PM
Nested DIVs - is there a better way? Guadala Harry ASP .Net 2 10-26-2004 07:30 PM
asp.net and divs mikieg_99 ASP .Net 6 07-30-2004 01:19 PM
Re: DIVs and overflow scroll bars S. Justin Gengo ASP .Net 0 07-18-2003 02:18 PM



Advertisments