![]() | | ||||||||
| | #1 |
| Warrior Member Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
| I want to center my website and behind the centered div tag i want to have a plain gray background but i can't seem to get any codes to work. Please give me the exact codes and where to put them...i dont know if i should put it in a css or right in the page code. |
| | |
| | |
| | #2 |
| Senior Warrior Member War Room Member Join Date: Jul 2008 Location: Niagara Region, Canada
Posts: 1,113
Thanks: 1,478
Thanked 412 Times in 322 Posts
|
add this to your css stylesheet Code: body { background: #cccccc; } |
| | |
| | |
| | #3 |
| Warrior Member Join Date: Mar 2009
Posts: 28
Thanks: 2
Thanked 3 Times in 3 Posts
|
If you just want the background within the div container then css would be similar to above eg: styles.css Code: #bgstyle {
background: #cccfff;
} Code: <div id = "bgstyle"> <p> this is within the div tag </p> </div> |
| | |
| | |
| | #4 |
| c/l:i\c.k{m}o^n'k[e]y War Room Member Join Date: Nov 2006 Location: On the Internet relentlessly doing work so you can make more money and have more time for fun! :-)
Posts: 30
Thanks: 16
Thanked 10 Times in 8 Posts
|
Hello! :-) The suggestions that have already been provided will probably work perfectly for you. If for some strange reason they do not, one other approach you can try is to include the style data within the div tag itself... Code: <div style="background: #cccccc;"> </div> |
| | |
![]() |
|
| Tags |
| background, centered, code, css, div, exact, put, tag |
| Thread Tools | |
| |
![]() |