wilna Posted June 24, 2010 Share Posted June 24, 2010 Hi I've tried to google php & css for over an hour now. I have a file (*.php) with php code in it. I would like to include css. How do I get started? I know in an HTML file you insert css as follows: <link rel="stylesheet" type="text/css" href="mystyle.css" />. How do you do it in php? Help will be apreicated. Link to comment https://forums.phpfreaks.com/topic/205737-php-and-css/ Share on other sites More sharing options...
joel24 Posted June 24, 2010 Share Posted June 24, 2010 PHP is a language which is read and executed by the server's computers and returns HTML to the viewer. So you just tell the PHP to echo the include when you echo the rest of the HTML head i.e. echo '<html> <head> <title>My Web-Page</title> <link rel="stylesheet" type="text/css" href="mystyle.css" /> </head> <body> </body> </html>'; Link to comment https://forums.phpfreaks.com/topic/205737-php-and-css/#findComment-1076589 Share on other sites More sharing options...
wilna Posted June 24, 2010 Author Share Posted June 24, 2010 Thank you! So easy - you just have to know how! Link to comment https://forums.phpfreaks.com/topic/205737-php-and-css/#findComment-1076591 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.