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! Link to comment https://forums.phpfreaks.com/topic/251987-im-havign-a-huge-problem-with-css/ 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;} Link to comment https://forums.phpfreaks.com/topic/251987-im-havign-a-huge-problem-with-css/#findComment-1292032 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. Link to comment https://forums.phpfreaks.com/topic/251987-im-havign-a-huge-problem-with-css/#findComment-1299131 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.