Jump to content

unable to alter body in CSS sheet


madmenyo

Recommended Posts

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!

 

Link to comment
Share on other sites

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 :D, yeah need others but screw IE i boycot that :D).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.