mrhello Posted May 14, 2009 Report Share Posted May 14, 2009 Hi all! I am a newbie with CSS and actually not very asvvy. I got this new full css template and would like to be able to change the background color on which the website "sits". Originally the background color was within the html coding of every page like this: (I have deleted this, because I thought it is otherwise over writing the stylesheet command for the color?) Now I would like to put the background color into the style sheet, so I can change the color site-wide, if required. The code in the style sheet is: #container { width: 950px; margin-right: auto; margin-left: auto; background-color: white; border: thin; border-color: #a9a9a9; border-style: solid; } #body{ margin: 0px; padding: 0px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; color: black; } What needs to be altered in the style sheet and what would I need to put onto the page source code?? Thanks in advance for your help and advice, new-to-css Quote Link to comment Share on other sites More sharing options...
krazigoddezz Posted May 14, 2009 Report Share Posted May 14, 2009 i think all you have to do is add background-color to #body. #body{ margin: 0px; padding: 0px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; color: black; background-color: silver } and to link a web page to the style sheet, you need to add: where style.css is the name of your css file. this line needs to go the head tags. for example: Your Page hope this helps. you should check out w3school's site. it is full of helpful tutorials. Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted May 14, 2009 Report Share Posted May 14, 2009 You might need to delete the "hash mark" fromin front of the body tag in the css file. It would be looking for Quote Link to comment Share on other sites More sharing options...
dms Posted May 14, 2009 Report Share Posted May 14, 2009 1st) Remove (background-color: rgb(255, 255, 0); direction: ltr;) from your tag in the html. 2nd) Add it to your style sheet......... body {background-color: rgb(255, 255, 0);} you should not need the direction: ltr; As jlhaslip mentioned, remove the hash mark from in front of body. Do you have an id set for container, if not remove the hash mark there also. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted May 14, 2009 Report Share Posted May 14, 2009 MODERATOR'S NOTE: Please note that this post was editied to contain spam links (I have deleted them). With that in mind, I am not sure whether the question is valid or not. 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.
Note: Your post will require moderator approval before it will be visible.