|
Post by phil832 on Dec 12, 2007 9:08:16 GMT -5
Hi Everyone, I'm wanting to change the background color of my entire web site from blue to red. Any easy ways of doing this: ie. CSS or HTML. I haven't been able to locate the part of the code that i need to change. Will it be on the main index file or the main. css script file. Many thanks to anyone wanting to help !. Phil.
|
|
Nancy
Senior Member
I've learned...that it's those small daily happenings that make life so spectacular.
Posts: 957
|
Post by Nancy on Dec 12, 2007 15:46:59 GMT -5
;DHey Phil,
You know I am not good at the whole html/css thing. But if you are using NVU, just click on Format, then from the drop down go to page colors and background. Change your background to any color you want from there.
Nancy ;D
|
|
|
Post by troyzone on Dec 12, 2007 19:55:30 GMT -5
Hi Phil, The short answer is it could be any of the above You can change your page's background color either via your HTML or CSS, and the code for it could be right inside your HTML source code or it could be in an external CSS stylesheet file if you are using an extermal stylesheet. Many people here are using an internal stylesheet, where the CSS style code is right inside your web page's <head> section, but I looked at your page's source code and the following line inside the <head> section indicates that you have an external CSS stylesheet file: <link rel="stylesheet" type="text/css" href="main.css"> <script type="text/javascript"> External stylesheets are good if you have multiple pages on your site that use the same styles, as they can all link to this one .css file. Changes to styles in an external .css file affect the appearance of all web pages that link to it. As Nancy mentioned, you can usually change your page properties in an HTML editor and change the page's background color that way, if your page's background is set in this matter rather than using CSS. In your case, your page's <body> tag does not have any color attributes in it before the closing >, so your page must be getting its background color from your CSS stylesheet code. As mentioned above, you have an external stylesheet file called main.css according to the section of code I quoted previously. If you look inside your main.css file, you can see that your page's background color and other page styles is set by the following section of code near the bottom: body { margin-left: 10px; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; background-color: #0066cc; } The body selector is actually mentioned a few times in that file. If the same property is set more than once in the file, the last one takes precedence. In the code above, the background-color: #0066cc; part sets the background color of your page's body. Just change the #0066cc hexadecimal color code to another code of your choosing in order to change the background color. If you are using NVU, you can probably edit your .css file via the CSS Editor feature in the Tools menu. For a posting describing this feature of NVU in more detail, see the following sticky post in the NVU board: erichw33.proboards53.com/index.cgi?board=nvu&action=display&thread=1160695646Hope this helps. Troy
|
|
|
Post by phil832 on Dec 12, 2007 21:15:06 GMT -5
Hi Nancy, and Troy.
Thanks for your help- i've succeeded in changing the color, which was a lot easier than first thought. It's cool when you only have to change the main css code -and all the pages change simultaneously. This saves a lot of work and time,not to mention stress!. ;D Im also changing the links which appear on the site- the blue links go well with a blue background- but they don't look the same with a red background. The adsense ads will be changed too!. My goal is to optimise the layout and links to that the page is more user-friendly.
I've had too much traffic click through and away from the site without them looking around and browsing properly.
Many thanks again- added karma to you both!. Best regards ;D
Phil.
|
|