homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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
CyanideRush




msg:1302073
 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?

 

Birdman




msg:1302074
 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" />

Birdman

CyanideRush




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

place it right in after the <?php tag?

aus_dave




msg:1302076
 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 :).

Birdman




msg:1302077
 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.

CyanideRush




msg:1302078
 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