Stalingrad Posted November 28, 2011 Share Posted November 28, 2011 I've tried like 100 different times, nothing works. I'm using a PHP based website. The folder is style.css where the CSS is displayed. It doesn't work. How do I get it to display within the php code. Here is my index.php: index.php: <?php session_start(); include("config536.php"); ?> <html><head><title> Hello World </title> <link href="style.css" rel="stylesheet" type="text/css"></head><body> <?php echo "<td class=\"banner\">Welcome!!</banner><td class=\"top\">Testing this!</top><td class=\"body\">Testing this again!!</body>";?> </body></html> the second like of the config files is including the style.css, so that isn't the problem. And teh config file exists. Here is my style.css file: style.css: <style><body>body { font-family: verdana; } .banner{font-size: 58px; color: #fff;} .top{font-size: 18px; color: red; } .body {font-size: 25px; color: green;} </body></style> This is my third time posting this within the past 6 months, guys, PLEASE solve this. I cannot continue my website anymore if this will not work! Quote Link to comment Share on other sites More sharing options...
Network_ninja Posted November 29, 2011 Share Posted November 29, 2011 remove the <style> and <body> tags: body { font-family: verdana; } .banner{font-size: 58px; color: #fff;} .top{font-size: 18px; color: red; } .body {font-size: 25px; color: green;} Quote Link to comment Share on other sites More sharing options...
LoneStarJack Posted December 19, 2011 Share Posted December 19, 2011 If you link (<link href="style.css" rel="stylesheet" type="text/css"> ) -- do not include the <style> tags in the style.css file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.