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 7 of 7

Thread: ul attributes

  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ul attributes

    Hello, I'm trying to line up these listed items in the red div and spaced them out longer horizontally. Could someone help me out?

    You can view my page at

    http://thebuffalonetwork.com/project...cdpc-test.html


    ~Tim

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    Hello there,

    I have had a look at the website, and did some modifications to the CSS. Please save a backup copy of your css before replacing it with the following.

    Note: I only modified #navigation, #navigation ul, #navigation li, #navigation a, and #navigation li a. Please replaced them with the following.
    Code:
    #navigation {
            width: 400px; 
            height: 300px; 
            background: red; 
            padding: 0px;
            float: left  
    }
    
    
    #navigation ul {
    	list-style-type: none;
    	font-family: "ariel";
    }
    
    #navigation li {
    	display:inline;
    	margin: 0px;
    	padding: 0px;
    	background-color: none;
    	background-image: none;
    }
    
    #navigation a:link, #navigation a:visited, #navigation a:active{
    	color: white;
    	text-decoration: none;
        padding: 2px 5px;
    }
    
    
    #navigation a:hover {
    	color: #FFFFFF;
    	background-color: #F1D975;
    }
    Note: I have tested the CSS with FF and IE7. Please test them with other browsers.

    Good Luck.
    Ess

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,747
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hey Tim,
    Do you mean like this:
    Code:
    #navigation {
            width: 200px; 
            height: 300px; 
            background: red; 
            padding: 0px;
            float: left  
    }
    Or like this:
    Code:
    * {
    margin: 0;
    padding: 0;
    }
    #navigation ul {
    	list-style-type: none;
    	font-family: "ariel";
    	font-size: 1.2em;
    }
    #navigation li {
    	float: left;
    	width: 6em;
            margin: 0 0 10px 5px;
    	text-align: left;
    	background-color: none;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    New Coder
    Join Date
    Dec 2006
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks guys!

  • #5
    New Coder
    Join Date
    Dec 2006
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay guys, that lined it up just right, but now I need to space them horizontally. Meaning, the space between each word horizontally, I need to increase. Any tips?

  • #6
    New Coder
    Join Date
    Dec 2006
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I got it guys, I messed around with the padding, thankyou!

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,747
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Code:
    #navigation li {
    	float: left;
    	width: 6em;
            margin: 0 0 10px 5px;
    	text-align: left;
    	background-color: none;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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