Need help with left align in list

Discussion in 'CSS' started by wholesalechecklist, Oct 17, 2007.

  1. #1
    www.wholesalechecklist.com

    If you see the categories list, I want to keep the actual words in the same position, but left align them. I cant figure out how. Any ideas?
     
    wholesalechecklist, Oct 17, 2007 IP
  2. tripo

    tripo Peon

    Messages:
    8
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have this rule in your CSS:
    
    .category_links {
    	width:292px;
    	padding:0 16px 8px 8px;
    	float:left;
    	list-style:none;
    	text-align:center;
    	font:bold 12px/36px verdana,arial,sans-serif;
    }
    
    Code (markup):
    Change text-align:center; with text-align:left;
     
    tripo, Oct 17, 2007 IP
  3. wholesalechecklist

    wholesalechecklist Peon

    Messages:
    511
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I did that, but now I cant get it to slide back to the right so the actual text is centered in the box....
     
    wholesalechecklist, Oct 17, 2007 IP
  4. wholesalechecklist

    wholesalechecklist Peon

    Messages:
    511
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    nevermind, I think I got it. Is the coding proper?
     
    wholesalechecklist, Oct 17, 2007 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Looks good.
    
    .category_links a:active,
    .category_links a:focus,
    .category_links a:hover {
    	color:#008;
    }
    
    Code (markup):
    Only thing to watch out for is if you ever decide to change active or hover and want them to be different, you'd put them in another order (there's a mnemonic people use, Love Ha! for L V H A (link, visited, hover, active). Focus I think comes between visited and hover. Since they're now all the same, it's good.
     
    Stomme poes, Oct 18, 2007 IP