Convert Table Layout to CSS Layout
Newbie to CSS here,
I have a site developed with Tables, Frames ans Framesets. Is there an easy way to convert this into a CSS based layout?
I would at least like to remove the table and use Divs with CSS placement, but I have never attempted this before. Any Guidelines would be nice.
The site uses PHP for most of it, also the site is very data driven, so the tables are populated on the fly using MySQL.
Can I substitute this
with a better way?
<td>PHP to generate my MySQL data here</td>
Thank goodness you're working towards a better layout -- the previous one sounds like a nightmare!
This online CSS layout generator might help you:
or these tutorials:
In general the sub for that would be
<div>PHP to generate my MySQL data here</div>
but the way you develop a CSS page is radically different from the way you do it with tables.
I guess another question I would have is how do I get the table, table row, table data structure using CSS with div tags?
My SQL queries are returning the table data right now, how would I do the same thing with CSS.
would it be something like
and then how would I do the CSS to get the position of a table like div or div like table?
<div class=td>MySQL Returned results</div>
(If it is tabular data, you're justified in using a table.)
You can use floated lists:
If the queries are actually returning rows of tabular data then a table is the right mark up. If they are returning managed content then that managed content should be marked up semantically.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)