madmenyo Posted May 20, 2010 Share Posted May 20, 2010 Hey guys, For starters i have this in the head of my HTML inside my .PHP file. <link href="styles.css" rel="stylesheet" type="text/css" /> I already have done some CSS work in the styles.css like some divs that function like tables. These work perfectly. The problem is when i add this to the styles.css : body { background-color: black; } It won't work in my PHP file. If i embed the style inside the body element like this it does work.... : <body style="background-color: black;"> </body> Obviously i want it to work inside my CSS file. What can be the source of the problem? Tx! Quote Link to comment Share on other sites More sharing options...
haku Posted May 20, 2010 Share Posted May 20, 2010 Is your stylesheet in the same folder as the html document? Quote Link to comment Share on other sites More sharing options...
madmenyo Posted May 20, 2010 Author Share Posted May 20, 2010 Yeah, Like i said the PHP file is even displaying other styles from the same CSS sheet where the body style is in. But it just displays a white body. In dreamweaver i actually get the body color to change if i put it on design view..... but it just won't work in firefox (the only browser i have , yeah need others but screw IE i boycot that ). Quote Link to comment Share on other sites More sharing options...
haku Posted May 21, 2010 Share Posted May 21, 2010 In that case you either have a selector with higher precedence setting the background-color. Unlikely, though you may have: html body { background-color:something; } or else you have another body declaration coming somewhere after the original one. Firefox plus the firebug plugin can help you debug this stuff. Quote Link to comment Share on other sites More sharing options...
madmenyo Posted May 22, 2010 Author Share Posted May 22, 2010 It might have been that, i have been messing around with some stuff and it miraculously fixed it.... not the most genius way to fix something but it will do for now . 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.