...

View Full Version : Website layout questions



Hein
02-15-2012, 06:42 AM
Hi everybody I am new to the forum!
I'm still a newbie at web development but I am eager to learn!

Basically I know it's bad programming practice to do a site layout using tables and frames has their own set of problems.
So would it be better to use div tags to layout my site?

Co1dFusion
02-15-2012, 07:16 AM
Yes you should use div tags for layout. I would reomend you start with W3Schools CSS guide.

Hein
02-15-2012, 07:29 AM
Awesome thanx bud!

DrowSsrep
02-15-2012, 10:08 AM
Just a beginners tip on how to make divs similar to tables.


<table>
<tr>
<td>one</td>
<td>two</td>
</tr>
</table>

is the same as


<div style="display: table;">
<div style="display: table-cell;">one</div>
<div style="display: table-cell;">two</div>
</div>


Read more about it (http://www.w3schools.com/cssref/pr_class_display.asp)

.

jackdaniels
02-15-2012, 01:53 PM
<div style="display: table;">
<div style="display: table-cell;">one</div>
<div style="display: table-cell;">two</div>
</div>

It is the same, but it's good to note people don't usually use this css on divs. IMO don't make divs then apply table css. If you want to make tables, then make tables, it's not the anti-christ.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum