homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

php css implimentation

 11:33 pm on Apr 12, 2004 (gmt 0)

I've got an external html css file. How do I apply it to a php file? specifically what is the code and where do I place it?



 11:37 pm on Apr 12, 2004 (gmt 0)

It's the same as doing it in an HTML file. Just put the <link> tag in the head of the document.

<link rel="stylesheet" type="text/css" href="/stylesheet.css" />



 12:23 am on Apr 13, 2004 (gmt 0)

place it right in after the <?php tag?


 12:26 am on Apr 13, 2004 (gmt 0)

You need to make sure Birdman's code above is outside the PHP tags, either in the same file or in an included file containing your HTML.

PS Forgot to add Welcome [webmasterworld.com] to WebmasterWorld, CyanideRush :).


 12:29 am on Apr 13, 2004 (gmt 0)

I'm sorry, I should have said it before. Make sure you are out of PHP mode when you add that line. Anything between the <?php?> tags is supposed to be PHP code and anything outside of the tags is treated as regular HTML.

Imagine this, you rename an HTML(page.html) page to php(page.php) and do not even change the file. No, <?php?> tags, just the same HTML page. It will render exactly the same as if it were named .html.

So, just look for the <head> section of the page and add the line in there. If you don't see a head section, then the file you are viewing is probably being included from a master file which does have the <head> section.


 12:30 am on Apr 13, 2004 (gmt 0)

Thanks dave, I'll browse that now.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved