homepage Welcome to WebmasterWorld Guest from 23.20.220.61
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Change background colors/font colors
watchtower101




msg:4278171
 5:53 am on Mar 8, 2011 (gmt 0)

Sorry if this is too much code. I am a cut and paster at this.
How would I change this CSS so the background color is pale green (instead of dark grey) and the text is black (instead of white). Thanks.

<!--
.black { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none; font-size: 11px; font-style: normal; font-weight: normal}
.black13 { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none; font-size: 13px; font-style: normal; font-weight: normal}
.header:link { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none; font-size: 24px; font-style: bold; font-weight: 600}
.header:hover { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none; font-size: 24px; font-style: bold; font-weight: 600}
.header:active { font-family: Arial, Helvetica, sans-serif; color: #000000; text-decoration: none; font-size: 24px; font-style: bold; font-weight: 600}
a { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 11px; font-weight: normal; text-decoration: none}
a:link { font-family: Arial, Helvetica, sans-serif; color: #8EB2D3; font-size: 11px; font-style: normal; font-weight: normal; text-decoration: none}
a:hover { font-family: Arial, Helvetica, sans-serif; color: #8EB2D3; font-size: 11px; text-decoration: underline}
a:active { font-family: Arial, Helvetica, sans-serif; color: #8EB2D3; text-decoration: none; font-size: 11px; font-style: normal; font-weight: normal}
.go { font: normal 11px/normal Arial, Helvetica, sans-serif; color: ffffff; }
.header { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none; font-size: 24px; font-style: bold; font-weight: 600}
a:visited {
color: #CCCCCC;
}

-->

 

webprutser




msg:4278178
 6:27 am on Mar 8, 2011 (gmt 0)

Hi Watchtower 101,

We all have to start somewhere, that counts for me too. I try to answer some "easy" questions (as far as those exist, thus the quotes) every now and then, so other people have more time to help me with the things I can't work out. :-)
The two CSS properties you need for this are background-color and color. Background-color being the color of the background of the element attached to it, color the font-color. If you want your font color to be black instead of white, you replace #ffffff for (font-)color specifications by #000000 (or the shorthand for that: #000). I can't discover any pale green or dark grey colors, but that is probably due to my screen. I get a pale blue for #8eb2d3 and a light grey for #cccccc. In any case if you want an element to have a background with a certain color, you specify background-color: ......, e.g.a:visited {background-color: #......}. Haven't tested it and never used background-color for links, so if background-color and links don't match let me know and post the html so I could give it a div to accomplish what you want.

webprutser




msg:4278181
 6:50 am on Mar 8, 2011 (gmt 0)

P.S.
Just read something about links with regard to some problem I run into myself and background-color is a property that can be used for links.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved