Quick CSS Page Margins ?uestion

**hey! **
i’ve got a linked style sheet thats not acting the way i want it too. i want to set all the page marigins to zero and added the following code to my style sheet:

 <style> 
 
body
{ 
 margin-top: 0px; 
 margin-bottom: 0px; 
 margin-left: 0px; 
 margin-right: 0px 
}

p
{ 
 background: yellow; 
 font-family: courier 
}

 
</style>

now… the < p > styles are working just fine… so i must be doing something wrong, or using the wrong code to effect the page margins. what do i need to do differently? **thanks! :block: **

first, you should use margin: 0px; rather than defining each seperately, it’s also good to set padding to 0 at the same time though. And I don’t understand what’s the problem, you’re saying because it works you did something wrong?

yeah… i should have been a bit more clear. the styles for the < p > were working… but not the < body > styles. after some further investigation, i noticed that dreamweaver didnt seem to list the body styles in the Design/CSS Styles window. but for some reason when i wrote it like this:

 <style> 
body
{ 
 margin-top: 0px; 
 margin-bottom: 0px; 
 margin-left: 0px; 
 margin-right: 0px;
 font-family: courier 
}
P 
{ 
 background: yellow; 
 font-family: courier 
}
 
body
{ 
 margin: 0px;
 font-family: courier 
}

</style>

it seemed to work just fine: no page margins, and the design window in dreamweaver saw the second body style code. it still wasnt showing the first.

thanks for the margin suggestion! dont know why dreamweaver doesnt like my first body style… but at least it seems to be working the way i want now! but…

is something about the way the first body style is written wrong? why doesnt dreamweaver, or IE seem to recognize it? i dont see why the first body style doesnt work, and the second body style does? any thoughts? if not… oh well. its working fine now. thanks for the response!

I have no idea why that isn’t working, it should be, anyways, ie isn’t any good and that’s probably why it doesn’t like it :P, but not sure about dreamweaver

hmmm… from what i can tell… dreamweaver doesnt seem to like or recognize the first stlye listed. whatever it is. might be some sort of strange bug… or maybe i’m doing something stupid… oh well… i dont care anymore… i’ve got a working solution. :wink:

again, thanks for taking the time to help me out with the question.

later…

np :wink: