1.

Solve : I can't figure out how to make a box on my webpage?

Answer»

Hello,
I was viewing a source code to see how it's done and I can't get two colors to show up, the whole page is the same color.. Can SOMEONE please help me. Here is the example I want to have.. I want the bg to be a light pink, and the body background white... please help me... thanks in advancehttp://lovingwordministries.org/Hello

I think you are trying to change the page background color using CSS, that's fine but look to the , the attribute bgcolor is set to #ccc change it or I prefere to remove it and control the color from CSS

regards

Feras Jobeir Quote from: feras on July 17, 2011, 11:51:20 AM

I think you are trying to change the page background color using CSS, that's fine but look to the <body>, the attribute bgcolor is set to #ccc change it or I prefere to remove it and control the color from CSS
Where do you see that in his CSS?  I see no INDICATION of that. I've tried changing the color for the bgcolor... but that MAKES the whole page the same color. I want the bg one color and then a white text box I can write in..Start from the beginning.

Think of a web page as a series of layers. On the bottom, you have the , which you have at a light pink.
What you need to do is add another layer on TOP of the and put your text in that. Here's the code.

Code: [Select]<body style="background:pink;">
    <DIV style="width:800px; background: #fff">
        <!-- content goes here -->
    </div>
</body>

You can use either style="whatever" or bgcolor="whatever". Using CSS (style) is probably better nowadays.thanks  kpac, that sure gave me a white box to type in, and thats great... however, thats not what I need... if you go to my page and refresh you'll see. What i'm wanting is a pink bg and the whole center of that page to be white... like when you put a pic on construction paper in a frame..
http://sugrbean.com/newlook3.htmli've tried it here also cant get it to work    http://sugrbean.com/newlook5.html


Discussion

No Comment Found