Jump to content


Photo

<div> or <table>


  • Please log in to reply
11 replies to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 15 August 2006 - 05:27 PM

i know this aint a php question... but wat is best for designing websites, using <tables> or <divs>

#2 DocSeuss

DocSeuss
  • Members
  • PipPipPip
  • Advanced Member
  • 73 posts
  • LocationTexas, USA

Posted 15 August 2006 - 05:30 PM

<div>s are the way to go
"Unlimited budget? Great, for $5,000,0000 we will run your ad banner for one year"  ----Rasmus Lerdorf

#3 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 15 August 2006 - 05:32 PM

thanks..

#4 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 15 August 2006 - 05:35 PM

Can I ask how you can make tables with <div>s?

Aren't <div>s just horizontals?
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#5 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 15 August 2006 - 05:35 PM

Depends. Layout should be done in <div>

tabular data should be done in tables :)

<div> load faster than <table> do. Or thats my experience.  Though <div>s need more tricks to employ to get them to look the same across different browsers.

Its why I used tables for so long.  I didnt really have to worry about them not working properly in other browsers.  Now that I am using <div> its a bit more work, but the pages look nicer, are easier to manage and load faster :)

#6 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 15 August 2006 - 05:36 PM

You can 'float' the <div> tables to make tables. It can get hectic but it is doable :)

#7 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 15 August 2006 - 05:40 PM

I use tables everywhere and I'm not new to CSS but i rarely use <div> because I've found it such a pain in the past. Know any sites I can look at to see how they can be used?
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#8 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 15 August 2006 - 05:42 PM

My site uses simple 2 column CSS layout

www.tingram.ca

Should be able to see the source code to see how the floats are done. I dont use the css sheet much because I was playing with the div tags individually.

This site: http://css.maxdesign.../floatutorial/  I've used a few times to help me figure out layouts and such.

As for tables using <div> I can't remember where I saw an example of it.  I'm sure google can find something about it though.

#9 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 15 August 2006 - 05:45 PM

Many thanks - will go off and hunt some down now :)
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#10 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 15 August 2006 - 06:08 PM

Search engines prefer divs over tables since there is less tags, and therefor a smaller amount of data it has to read through.

#11 RightNow21

RightNow21
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 15 August 2006 - 06:49 PM

Use CSS to control the <div> the size, position, color etc.

Link the style sheet outsite and you page will be very clean for SEO too!

#12 newb

newb
  • Members
  • PipPipPip
  • Advanced Member
  • 454 posts

Posted 15 August 2006 - 06:52 PM

how do you learn how to make tableless div only websites?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users