|
|
#1 |
|
Bronze Member
![]() Join Date: Sep 2009
Posts: 57
|
First, how do I get the text in the buttons to change colors (give sample code please) using css.
Also the text of the main content area is too close to the margin. Please give me some details how to fix. www.absherkennels.com/construction_test.html Thanks, gumspitter Last edited by gumspitter; 02-24-2010 at 07:47 PM. |
|
|
|
|
|
#2 |
|
Platinum Member
![]() Join Date: Jul 2009
Location: Michigan
Posts: 501
|
For the buttons to change color you need to utilize the pseudo class selectors, for instance:
ul#navlist li a { color: #ffffff; background-color: #003366; padding: 3px; border: 1px #ffffff outset; } ul#navlist li a:hover { color: #ffff00; background-color: #003366; } ul#navlist li a:active { color: #cccccc; background-color: #003366; border: 1px #ffffff inset; } Second For the text to move over, use padding: #container { padding: 5px; } Obviously adjust as necessary. I hope this helps, I am still quite new at CSS!! |
|
|
|
|
|
#3 |
|
Super Moderator
![]() Join Date: Oct 2008
Location: Arizona, USA
Posts: 1,050
|
DJM,
Anna is 99% correct (good job ). Only minor thing I would correct is you don't need to add the background-color to the hover and active states if it is going to be the same as the original (static) style. Rule of thumb, after creating a style for element, only add the items you want to change in the hover, active, visited, focus states. Padding - adds spacing to the internal area of an element. Margin - adds spacing to the external area of an element. Anchor Style Code:
ul#navlist li a
{
color: #ffffff;
background-color: #003366;
padding: 3px;
border: 1px #ffffff solid;
}
ul#navlist li a:hover
{
color: #ffff00;
}
ul#navlist li a:active
{
color: #cccccc;
}
__________________
John Darling Graphic / Web Designer SmarterTools Inc. (877) 357-6278 www.smartertools.com |
|
|
|
|
|
#4 |
|
Bronze Member
![]() Join Date: Sep 2009
Posts: 57
|
I want to use the current button list but only want the text to rollover. Please help.
|
|
|
|
|
|
#5 |
|
Platinum Member
![]() Join Date: Jul 2009
Location: Michigan
Posts: 501
|
Yea!! I got it almost right!!!
![]() I think for just a rollover change, you would add the hover selector and leave the active off. Is that correct Pixel? |
|
|
|
|
|
#6 |
|
Bronze Member
![]() Join Date: Sep 2009
Posts: 57
|
Thanks, I got it!! eureka!!!
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|