Forum Moderators: not2easy

Message Too Old, No Replies

Need help with CSS text background

Css text background

         

manhattan12345

12:33 am on Feb 11, 2010 (gmt 0)

10+ Year Member



So i still dont get how people make their text background white...I tried using p{
font-family: Verdana,Arial,Helvetica,Sans-Serif;
color: #ffffff;
background-color: #000000;
}
but nothing would show..The website is still the same. (Im working on my website using Weebly.)

I dont know where to add it, can some one help me?
Heres my CSS code for the page.
*|* {
margin:0pt;
padding:0pt;
}
body {
background: transparent url(http://example.com/uploads/3/5/0/3/3503471/custom_themes/337579563438976/files/Untitled-3.gif?38673) repeat-y center center;
background-color:#FFCC66;
font-family:palatino,"Comic Sans MS",serif;
font-size:20px;
color:#00FF00;
margin:0;
padding:0;
}
p {
line-height:1.5;
padding-bottom:12px;
}
h1 {
font-size:20px;
font-weight:bold;
color:#fff;
line-height:1.5;
}
h2 {
font-size:14px;
font-weight:bold;
color:#fff;
line-height:1.5;
}
#wrapper {
width:960px;
margin:0pt auto;
}
#sitename {
height:55px;
width:960px;
font-size:36px;
color:#00CCCC;
font-weight:normal;
padding-top:62px;
text-align:right;
font-style:italic;
}
#content-wrapper {
float:left;
width:960px;
}
#header-image {
float:left;
width:952px;
height:221px;
border:5px solid #D0D0D0;
}
#image {
background:transparent url(%%HEADERIMG%%) no-repeat center top;
width:952px;
height:221px;
}
#contents-body {
float:left;
width:960px;
padding:0 20px 10px 15px;
}
#navigation {
background:transparent url(http://example.com/uploads/3/5/0/3/3503471/custom_themes/337579563438976/files/Untitled-4.png?34392) repeat-x center top;
float:left;
background-color:#321500;
width:221px;
margin-bottom:9px;
font-size:20px;
color:#FF9933;
}
#navigation-links ul {
margin:8px;
padding:14px 0 25px 0;
border:1px solid #441c00;
}
#navigation-links li {
font-size:16px;
list-style-type:none;
padding:8px 0 8px 14px;
}
#active {
color:#af5211;
}
#navigation-links a:link {
display:block;
color:#0066CC;
text-decoration:none;
}
#navigation-links a:hover {
color:#FFFF00;
text-decoration:none;
}
#navigation-links a:visited {
color:#0099CC;
text-decoration:none;
}
#active a:link {
color:#af5211;
text-decoration:none;
}
#active a:hover {
color:#af5211;
text-decoration:none;
}
#active a:visited {
color:#af5211;
text-decoration:none;
}
a:link, a:hover, a:visited {
color:#af5211;
font-weight:normal;
text-decoration:none;
}
#contents {
float:left;
width:704px;
padding:20px 0 0 20px;
}


/****************************** flyout menus ******************************/

#weebly-menus .weebly-menu-wrap {
z-index: 5000;
}

#weebly-menus .weebly-menu {
padding: 0;
margin: 0;
list-style: none;
}

#weebly-menus .weebly-menu li {
float: left;
clear: left;
width: 170px;
text-align: left;
}

#weebly-menus .weebly-menu li a {
background: #af5211;
position: relative;
display: block;
width: 100%;
border-right: 1px solid #66330f;
border-left: 1px solid #441c00;
border-bottom: 1px solid #66330f;
text-decoration: none;
font-size: 13px;
font-weight: normal;
line-height:1;
padding:5px 0 4px 0;
color: #fff;
}

#weebly-menus .weebly-menu li a:hover {
background: #af5211;
}

#weebly-menus span.weebly-menu-title {
display: block;
padding: 5px 10px;
}

#weebly-menus span.weebly-menu-more {
display: block;
position: absolute;
right: 5px;
top: 0;
font-family: Courier;
height: 28px;
line-height: 28px;
padding:4px 0 4px 0;
}




And here's my website.

<snip>

Thanks in advance for helping.

[edited by: limbo at 12:09 pm (utc) on Feb 11, 2010]

limbo

12:21 pm on Feb 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi manhattan12345

Welcome to WebmasterWorld [webmasterworld.com] :)

Forgive me if I've misreread your post, so this might be a stupid question, but did you try:

p {color:#000background:#fff;}

Looks like you have the colours back to front.

Also, if you haven't done so already ensure your pages are valid CSS [jigsaw.w3.org]/HTML [validator.w3.org] and that you have includes a CSS [developer.yahoo.com] reset in your document head.