Is it possible to output data directly to css tags in some way rather than to a table?
For example can output be sent to <div id="main"> rather than to <td>, <br> or <p> type tags?
Thanks <smiles>
nascent
(still super clueless newbie)
PHP and CSS
Page 1 of 19 Replies - 1591 Views - Last Post: 13 June 2005 - 09:24 PM
Replies To: PHP and CSS
#2
Re: PHP and CSS
Posted 12 June 2005 - 08:22 PM
Do you mean out put data derived from ascript, or obtained from a database? Data can be output anywhere...td,br (this is actually just a line break), and p tags are merely used for formatting.
#3
Re: PHP and CSS
Posted 13 June 2005 - 10:41 AM
Amadeus, on Jun 12 2005, 08:22 PM, said:
Do you mean out put data derived from ascript, or obtained from a database? Data can be output anywhere...td,br (this is actually just a line break), and p tags are merely used for formatting.
What I would like to be able to do, is to use css instead of tables throughout the site. Then I could do all the layout and styling directly through css in the style sheet ... assuming this is possible.
So, rather than having a line like this:
echo "<td>{$Title} {$Composer} {$Solo}{$Desc} {$Duration}\n";
the line might look like this:
echo "<div id="title">{$Title}\n";
echo "<div id="composer">{$Composer}\n;
I know the above doesn't work, but it's the only way I can conceptualize it just now, cause I know so little <smiles>:
Thanks for your patience and any pointers.
nascent
#4
Re: PHP and CSS
Posted 13 June 2005 - 10:52 AM
i don't see any problem with that, thats how a lot of this very site works.
edit:
the key is, in your tags like <div id="title"> you need to use single quotes so that the echo doesn't end, like so <div id='title'>
edit:
the key is, in your tags like <div id="title"> you need to use single quotes so that the echo doesn't end, like so <div id='title'>
#5
Re: PHP and CSS
Posted 13 June 2005 - 11:04 AM
Check out the resources our members have submitted:
http://resources.dre...?p=links&cat=14
Almost all of the boxes you see on this site including the rows are done using <div> and CSS.
http://resources.dre...?p=links&cat=14
Almost all of the boxes you see on this site including the rows are done using <div> and CSS.
#6
Re: PHP and CSS
Posted 13 June 2005 - 11:45 AM
supersloth, on Jun 13 2005, 10:52 AM, said:
the key is, in your tags like <div id="title"> you need to use single quotes so that the echo doesn't end, like so <div id='title'>
Perfect! <smiles> ... thanks so much.
nascent
#7
Re: PHP and CSS
Posted 13 June 2005 - 11:48 AM
skyhawk133, on Jun 13 2005, 11:04 AM, said:
Thanks for intuiting my next question and answering before I posted <smiles>.
I really appreciate all the help. You guys are great!
nascent
#8
Re: PHP and CSS
Posted 13 June 2005 - 06:18 PM
Reading this post gave me a warm fuzzy glow. Yes, another newbie is learning to use CSS instead of tables. A new generation of greatness emerges.
#9
Re: PHP and CSS
Posted 13 June 2005 - 06:21 PM
More importantly, us old guys (Josh and I) are both using it now
#10
Re: PHP and CSS
Posted 13 June 2005 - 09:24 PM
i've always been using it, just not fully. my new site design will be 100% css when i get off my lazy ass though
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote






|