I was curious. On one of my pages, i have an inlcude statement that links to a txt file.
Now iam creating a css file for my website. Is there a way to apply css to the result that comes out of that txt file?
applying css to php results?
Moderator: General Moderators
I think this will help
Code: Select all
<td class="really cool"><?php include("stuff.txt"); ?></td>-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
If you include something into your current page it'll get formatted the same as the rest of the text.
It'll all get formatted with grey, verdana font.
Code: Select all
<?php
echo "<html><body>";
echo "<font color=#CCCCCC face=verdana>text";
include("file.txt");
echo "</font></body></html>";
?>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Also, anything in that text file will get interpreted first as PHP and then as HTML. So you can write tags, classes, etc. into that text file itself and it will all style appropriately when included (assuming those classes are defined already).
Yes, big ick to font tags.
And, spaces in class names are a BAD BAD idea. So bad that they totally won't work. Underscores are also supposedly a no-no, although they will frequently work. hyphens and studlyCaps are the best way to go.
Yes, big ick to font tags.
And, spaces in class names are a BAD BAD idea. So bad that they totally won't work. Underscores are also supposedly a no-no, although they will frequently work. hyphens and studlyCaps are the best way to go.
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm