How can i color the background of my site?

This is a discussion on "How can i color the background of my site?" within the Web Page Design section. This forum, and the thread "How can i color the background of my site? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 28th, 2008, 14:13
New Member
Join Date: Jun 2008
Location: UK
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question How can i color the background of my site?

Hi folks,

This is my first time here and i hoped somebody can help me out. Im building a site at www.which-lcd-tv.co.uk but i want to color the background outside of the main content area, in the past ive used this code:

Code: Select all
<style type="text/css"> 
body { background-color: #010066; } 
</style>
but i purchased a template for this site and have no idea where to put the code, or even if its the correct way! If anybody could help id be very grateful, its driving me nuts!

Thanks v much

gmbunn

Last edited by CloudedVision; Jun 28th, 2008 at 17:55. Reason: Code tags please
Reply With Quote

  #2 (permalink)  
Old Jun 28th, 2008, 14:57
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,319
Blog Entries: 8
Thanks: 13
Thanked 6 Times in 6 Posts
Re: How can i color the background of my site?

You are exactly right! Have you tried the code you posted? I see no reason as to why it would not work fine.
__________________
Resources Administrator


Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Reply With Quote
  #3 (permalink)  
Old Jun 28th, 2008, 15:04
Aso's Avatar
Aso Aso is online now
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,142
Blog Entries: 2
Thanks: 5
Thanked 39 Times in 36 Posts
Re: How can i color the background of my site?

Find the file with the extension .css, and add
Code: Select all
body{background-color:#010066}
anywhere in the file (to play it safe, put it on it's own line).

That's it!
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #4 (permalink)  
Old Jun 28th, 2008, 17:50
New Member
Join Date: Jun 2008
Location: UK
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How can i color the background of my site?

Hi,

Ive found 2 .css files! Ive added it to both but still no luck. Perhaps its something to do with there being 2 CSS files?

Here are the two files ive got.

Any ideas?

Thank you

gmbunn
Attached Files
File Type: css styles.css (14.3 KB, 2 views)
File Type: css MWF800New.css (13.1 KB, 3 views)
Reply With Quote
  #5 (permalink)  
Old Jun 28th, 2008, 17:57
CloudedVision's Avatar
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,229
Blog Entries: 9
Thanks: 2
Thanked 38 Times in 38 Posts
Re: How can i color the background of my site?

aso, background-color is not the way of writing it i would recommend. You should always use just background, whether for an image, a color, or both.
__________________
CloudedVision, WebForumz Moderator
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
Reply With Quote
  #6 (permalink)  
Old Jun 28th, 2008, 18:23
Aso's Avatar
Aso Aso is online now
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,142
Blog Entries: 2
Thanks: 5
Thanked 39 Times in 36 Posts
Re: How can i color the background of my site?

@CV: The only reason I suggested using background-colour, was if the CSS was already specifying a background image that gmbunn wanted to use. Using simply background would have overridden it.

@gmbunn: have you got an HTML file you could provide us? Chances are, the body background is hidden by a wrapper that takes up the whole window.
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #7 (permalink)  
Old Jun 28th, 2008, 18:25
New Member
Join Date: Jun 2008
Location: UK
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How can i color the background of my site?

Can anybody see whats wrong with the CSS files? I've tried literally everything but the background color just wont change.

Thank you

gmbunn
Reply With Quote
  #8 (permalink)  
Old Jun 28th, 2008, 18:28
Aso's Avatar
Aso Aso is online now
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,142
Blog Entries: 2
Thanks: 5
Thanked 39 Times in 36 Posts
Re: How can i color the background of my site?

Everything looks ok in the CSS - like I say, have you got an HTML page you could provide, so we can see the structure of your markup ?
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #9 (permalink)  
Old Jun 28th, 2008, 18:31
New Member
Join Date: Jun 2008
Location: UK
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How can i color the background of my site?

yeah sure, here it is:

Thanks for your help, i think im going nuts here!
Attached Files
File Type: txt html-file.txt (13.2 KB, 1 views)
Reply With Quote
  #10 (permalink)  
Old Jun 28th, 2008, 18:35
Aso's Avatar
Aso Aso is online now
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,142
Blog Entries: 2
Thanks: 5
Thanked 39 Times in 36 Posts
Re: How can i color the background of my site?

Found the issue - your background is being set *in* your HTML using inline styles, which override anything set in your stylesheets.

You need to find the line;
HTML: Select all
<body id="ctl00_div" style="margin: 0px; background-color: rgb(255, 255, 255);">
and change the rgb(255, 255, 255); part to #010066.

Trouble is, if that line is in every HTML page, you will have to modify all of them
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #11 (permalink)  
Old Jun 28th, 2008, 18:51
New Member
Join Date: Jun 2008
Location: UK
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How can i color the background of my site?

Hi Aso,

that worked fine, but it colored the background of the whole page. I am trying to color the background outside of the site (outside of the site outline) you can see where i mean here: www.which-lcd-tv.co.uk. I dont suppose there's a simple way to do that?

again, thank you for your help
Reply With Quote
Reply

Tags
background color, coloring background, css

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having a problem with background color? jaambees Web Page Design 2 Jan 4th, 2008 02:05
background color in xml kool77 Other Programming Languages 2 Jul 7th, 2007 15:30
background-color kapyrossi Web Page Design 5 Jul 4th, 2007 15:53
background color kaz Web Page Design 4 Aug 4th, 2005 17:28
background color kaz Web Page Design 1 Apr 20th, 2005 11:43


All times are GMT. The time now is 21:04.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43