www.webdeveloper.com
Results 1 to 5 of 5

Thread: Need help with text alignment

  1. #1
    Join Date
    Feb 2008
    Posts
    7

    Need help with text alignment

    I have been tweaking an=d tweaking and this is about as close as I can get it. See attachments, _try is how it is lining up. The only one that is perfect is the middle one. Can someone get this better? I may be making it harder because of assigning attributes to the UL and LI...
    HTML:
    Code:
    <div id="left-menu">
    	<ul>
    	<li><a href="index.html">Home</a></li>
    	<li><a href="blog/index.php">Blog</a></li>
    	<li><a href="speaking.html">Speaking</a></li>
    	<li><a href="advertise.html">Advertise</a></li>
    	<li><a href="contact.html">Contact</a></li>
    	</ul>
    </div>
    CSS:
    Code:
    #left-menu ul {
      padding: 36px 20px 4px 28px; 
      line-height: 21px;
      color: #FFFFFF;
    }
    
    #left-menu li {
      padding: 0px 20px 4px 20px; 
      list-style-image: url(images/arrow_wht.jpg); 
      list-style-type: circle; 
    }
    Thanks in advance!
    Attached Images Attached Images

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Can you give a link?

  3. #3
    Join Date
    Feb 2008
    Posts
    7
    Not really, it's still in development. It's in a div by itself so getting it right in the div should work. I don't have any conflicts with other divs on the page if that's your concern.
    Thanks,

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Without seeing the full document, I can only assume the image size is the problem.
    An alternative method is to remove the list-style and place the image as a background to the list item, giving the text a margin-left to clear the image.

  5. #5
    Join Date
    Feb 2008
    Posts
    7
    Thanks, I ended up tweaking it and got it how I want.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles