Author Topic: How to add a background color. Yes I searched the web.  (Read 1765 times)

Offline electric77

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
How to add a background color. Yes I searched the web.
« on: September 01, 2010, 03:55:43 PM »
Hi Members

Again sorry to ask such a basic question but I've been reading all day about RGB and "named colors" and have added the code to the body tag such as :

<BODY bgcolor="#0099FF">  (the #0099FF is just an example and not my actual color I intend to use).

But nothing happens. Do I have to upload the color to my the same directory where my web page is located? If so how?

or does my browser recognize the color and all I have to do is place the code inside the Body tag???

I'm really confused and have faithfully been at this for two hours now with no success.

Please help
Thank you

Helping Webmasters - Webmaster Forum, Website Support and T35 Hosting Support

How to add a background color. Yes I searched the web.
« on: September 01, 2010, 03:55:43 PM »

Offline electric77

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #1 on: September 01, 2010, 05:47:09 PM »
The hex color that I wish to use is  #CCFFCC

I placed this in the body tag as listed below:
<BODY bgcolor="#CCFFCC"> 

But nothing happens. The color background on my web page is still White. What am I doing wrong please?

Do I need to use CSS instead of hex numbers?

Thank you

Offline placelogo

  • Newbie
  • *
  • Posts: 23
  • Karma: +1/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #2 on: September 02, 2010, 09:40:05 AM »
Hmmm.  I copied your code and put it in a file, worked just fine.  It may be that the template is interfering.

Try the style thing, and while you're doing that I'll setup a template and see if I can reproduce the failure.

Offline placelogo

  • Newbie
  • *
  • Posts: 23
  • Karma: +1/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #3 on: September 02, 2010, 09:53:26 AM »
The style thing isn't going to work, so if you haven't tried it yet. . . don't bother. :)

open the .css file and look for the 'background: ' part.  In the template I chose it didn't matter what the color was because they had a 'url(image)' tag right after the color.  When I took the url() out the background color changed just fine.

I've checked two of the templates, Tope and Portal.  Both use images for their background.  Once you take the code for the background image out then you can change the background color.

Offline electric77

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #4 on: September 05, 2010, 10:36:25 AM »
Hi Placelogo,

Thanks for helping. Yes your correct. The template had some code buried inside that prevented me from changing the background color. Way too much code for me to locate the exact code that was causing the interference.

I simply started a whole new index.htm file and did not use a template.

Worked just fine.

Thank you

Offline electric77

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #5 on: September 07, 2010, 02:11:15 PM »
To answer the original question.... I was using a template and i tried to change the background color. I am fairly new to html thus this was a big undertaking. I had to crawl through much coding to identify where the code change needed to take place.

Since this template was coded in CSS (a more advanced form of web coding) I simply did not have the experience and know how to perform such a task. The template is really nice but I decided to start from scratch and create a new file (no template) using the FCK editor to create the necessary coding.

It worked great!

To change the background color, simple add this INSIDE the <body> tag:

<body bgcolor="#33FFFF">   This gives your background a nice light blue color.

Here is a link which lists all the "web safe" color codes:

http://html-color-codes.com/

Thank you

Offline sneedandsouza

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-1
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #6 on: October 18, 2010, 11:52:06 AM »
Thanks for helping. Yes your correct. The template had some code buried inside that prevented me from changing the background color. Way too much code for me to locate the exact code that was causing the interference.I simply started a whole new index.htm file and did not use a template.

Offline marshlnutan

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #7 on: November 08, 2010, 12:39:14 AM »
thank you for assisting. Yes your adjust. The template had about code buried interior that kept me from changing the back off color. Way too very much code for meadow to locate the demand code that was inducing the interfere.

Offline placelogo

  • Newbie
  • *
  • Posts: 23
  • Karma: +1/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #8 on: November 28, 2010, 01:00:41 PM »

Just so you all know, the problem AFAIK was that a background-image tag was used in the CSS that the template had already defined.

You can over-ride this directive by using your own background-image tag in the body of your page.

Here is what you do:

<body style="background-image: none; background-color: Wheat;">

This will nullify the background-image code in the buried CSS file and use the color Wheat as a background. This way you can have your template and change it too. :)

David



Offline rosstaylor345

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-1
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #9 on: March 16, 2011, 07:16:10 PM »
Thank you. Yes correct. The model was a bit of code buried inside, which prevented me from changing the background color. Too much code for me to find the exact code that was causing the interference.I just launched a brand new file index.htm and do not use a template.

Offline jeffersonthomas24

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-2
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #10 on: March 22, 2011, 04:08:55 PM »

You are right the template had some buried codes, way to many codes that I could not find the correct one that interferes,this codes prevented me in changing the background colors. So I did not use the template, I just started a new index.htm file.

Offline robinpeterson123

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-1
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #11 on: March 29, 2011, 04:39:26 PM »
The template had some code buried inside that prevented me from exchanging the background color. Way too much code for me to locate the accurate code that was causing the interference.

Offline andrewnell21

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-4
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #12 on: April 06, 2011, 04:02:51 PM »
You are right the template had some buried codes, way to many codes that I could not find the correct one that interferes,this codes prevented me in changing the background colors. So I did not use the template, I just started a new index.htm file.

Offline warrenbuffett42

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-3
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #13 on: April 07, 2011, 04:45:14 PM »
   Thanks for the assistance and you are correct. Template includes hidden code that avoided me from modifying the background. There is much code that made it difficult for me to find the appropriate one causing the interference.

Offline steveborder123

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-6
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #14 on: June 10, 2011, 12:04:22 AM »
The template had some buried codes; I am unable to find any right code. This code did not allow me to change the background color.

Offline andrebreton21

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-2
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #15 on: August 04, 2011, 02:58:01 AM »
Way too much code for me to locate the exact code that was causing the interference. Yes your correct. The template had some code buried inside that prevented me from changing the background color. Thanks for helping.

Offline darrenbravo123

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #16 on: November 07, 2011, 04:23:34 AM »
You are right the template had some buried codes, way to many codes that I could not find the correct one that interferes,this codes prevented me in changing the background colors. So I did not use the template, I just started a new index.htm file.

Offline carlhooper123

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: How to add a background color. Yes I searched the web.
« Reply #17 on: November 25, 2011, 03:20:52 AM »
Thanks for your help. Yes, right. Embed code for some of the template; change the background color to avoid me. Too much code, code is a good start of a new interference. I index.htm file I found no use of templates.