Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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;


  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,790
    Thanks
    8
    Thanked 131 Times in 129 Posts
    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

  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

  • #4
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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;
    }

  • #5
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    disregard the color: #313F57;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •