Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 02-24-2010, 07:45 PM   #1
Bronze Member
 
Join Date: Sep 2009
Posts: 57
Default Two Questions.

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.
gumspitter is offline   Reply With Quote


Old 02-24-2010, 08:56 PM   #2
Platinum Member
 
anna's Avatar
 
Join Date: Jul 2009
Location: Michigan
Posts: 501
Default

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!!
anna is offline   Reply With Quote
Old 02-26-2010, 03:48 PM   #3
Super Moderator
 
Join Date: Oct 2008
Location: Arizona, USA
Posts: 1,050
Default

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
PixelPusher is offline   Reply With Quote
Old 02-26-2010, 06:19 PM   #4
Bronze Member
 
Join Date: Sep 2009
Posts: 57
Default

I want to use the current button list but only want the text to rollover. Please help.
gumspitter is offline   Reply With Quote
Old 02-26-2010, 08:02 PM   #5
Platinum Member
 
anna's Avatar
 
Join Date: Jul 2009
Location: Michigan
Posts: 501
Default

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?
anna is offline   Reply With Quote


Old 03-02-2010, 06:16 PM   #6
Bronze Member
 
Join Date: Sep 2009
Posts: 57
Default

Thanks, I got it!! eureka!!!
gumspitter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:41 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.