Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-30-2006, 01:00 AM   PM User | #1
kaiiak
New Coder

 
Join Date: Dec 2005
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
kaiiak is an unknown quantity at this point
setting constant link background colour

this is what i have at moment, but it sets the background colour on each link with 2px padding around it....

i want it to set a constant size background no matter what size the word is... its for a menu and i want each colour for links to have consistent size....

ive tried without padding
and also setting a width size, not sure how to ammend it
PHP Code:
#mainmenu a:link,#mainmenu a:vsited{
        
background:#00FFFF no-repeat top left;
    
padding2px;
    
margin0px
        
width:150px;

kaiiak is offline   Reply With Quote
Old 01-30-2006, 01:13 AM   PM User | #2
harbingerOTV
Senior Coder

 
Join Date: Jan 2005
Location: Memphis, TN
Posts: 1,765
Thanks: 8
Thanked 123 Times in 121 Posts
harbingerOTV will become famous soon enough
you have a typo in visited. you have vsited.

fix that real quick and see if it changes anything
__________________
Stop making things so hard on yourself.
i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis
harbingerOTV is offline   Reply With Quote
Old 01-30-2006, 10:52 AM   PM User | #3
kaiiak
New Coder

 
Join Date: Dec 2005
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
kaiiak is an unknown quantity at this point
didnt spot that but, the linked box still doesnt appear constant, its bigger for bigger words, smaller for smaller words

if i added spaces to &bnsp; to each word to make it right length will that work..... but surely theres an easier way...
kaiiak is offline   Reply With Quote
Old 01-31-2006, 10:53 AM   PM User | #4
slackerbabe
New to the CF scene

 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
slackerbabe is an unknown quantity at this point
Smile

I think display:block; might be what you need...maybe with bottom margin....such as this:

#navigation li {
margin-bottom: 2px;
}


#navigation a {
background: #00FFFF no-repeat top left;
color: #313F57;
display: block;
width: 150px;
padding-left: 2px;
}
slackerbabe is offline   Reply With Quote
Old 01-31-2006, 10:55 AM   PM User | #5
slackerbabe
New to the CF scene

 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
slackerbabe is an unknown quantity at this point
disregard the color: #313F57;
slackerbabe is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 08:03 PM.


Advertisement
Log in to turn off these ads.