View Full Version : Php css
Neo-Geo
March 5th, 2004, 10:45 AM
can i know how to apply css into cell created using php.
... class = 'cssfile'
does not work
sinus_
March 5th, 2004, 11:20 AM
um... im not sure what u want... can u explain more?
<span class="cssfortext"> <?php echo "Hello World" ?> </span>
Neo-Geo
March 5th, 2004, 11:40 AM
let say you make a cell using php
echo "<table....
now i have css file and i want to apply the css into that cell
Jubba
March 5th, 2004, 01:52 PM
echo "<td class=\"myClass\">some crappy text in here</td>";
its no different than using regular html. just remember to escape the quotation marks...
sinus_
March 6th, 2004, 02:27 AM
ah yes... escape the quotes... i do find this very annoying...
sometimes, i just:
?>
<table width="100">
<tr bgcolor="<?php echo $BG_COLOR?>">
<td>
<?php echo Kill Mr. Burns!!! ?>
</td>
</tr>
</table>
<?php
it's probably not a good practice.. but i find esacping quotes pretty darn annoying... :(
Jubba
March 8th, 2004, 10:10 AM
eh, it actually doesn't matter which way you do it really. Personal preference I feel. The way you have it is better in some ways. I actually switch back and forth between methods...
sinus_
March 10th, 2004, 05:04 AM
ah thanks...
i have a problem though...
when i do this:
HTML with PHP
?>
<table width="100">
<tr>
<?php echo "<td>Welcome!</td>" ?>
</tr>
</table>
<?php
now the thing is, when i do the first one, Welcome! is displayed without proper "spacing"...
the source is like this:
HTML
<table width="100">
<tr>
<td> Welcome! </td>
</tr>
</table>
instead of this:
HTML
<table width="100">
<tr>
<td> Welcome! </td>
</tr>
</table>
how do i fixe that?
Jubba
March 10th, 2004, 10:53 AM
<table width="100">
<tr>
<?php echo "\t\t<td>Welcome!</td>" ?>
</tr>
</table>
\t tabs your source. I put two so it will tab that line over twice...
sinus_
March 11th, 2004, 02:05 AM
ah yeah! thanks :D
whoah! vash, just loaded your site... real nice! i love it... how did you do the effect for the images? with the scratches and stuff? did u use another textured image?
i just love the effects of it
Jubba
March 11th, 2004, 09:22 AM
lol wow I forgot that was up as my site. Well its not my site. It belongs to a friend of mine. I was helping him for a while but it turns out that he felt that having a fully functional, dynamic CMS wasn't as easy as uploading and editing HTML code. Plus he had a lot of trouble working around my schedule (it was free work, so you think he would have understood a little).
I believe those effects are just grunge brushes... you can find them all over the net. :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.