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 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    List Alignment Problems

    Site: http://jfinner1.co.cc/career.html

    Ok, so the issue I'm having is as follows. I have an external style sheet that center aligns my main content. I obviously don't want the lists on this page to be centered, so I added a styles tag at the top telling it to left align. Well, it worked a bit too well, because the lists are all aligned left, with no spacing for what should be indented tabs. Not sure how to fix this. Any help will be much appreciated. Thanks!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello jfinner,
    You've zero'd out the default margin/padding. Now that you want some, you need to declair your own.
    Start with something like this -
    Code:
    .leftalign ul{
    margin: 0 0 0 20px;
    }
    Also, for what you're doing with lists there, a Definition List might be fun.
    Code:
    <dl>
    <dt>title</dt>
    <dd>list item</dd>
    <dd>list item</dd>
    <dd>list item</dd>
    </dl>
    It's title gives you one more line to style. Some examples here.
    Last edited by Excavator; 12-15-2009 at 02:12 AM.
    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

  • #3
    LE1
    LE1 is offline
    New Coder
    Join Date
    Nov 2009
    Posts
    47
    Thanks
    4
    Thanked 1 Time in 1 Post
    Whats the advantage of using "dl"
    How does it difer to "ul"
    I've not used them before.

  • #4
    New Coder
    Join Date
    Mar 2009
    Location
    Milton Keynes, England
    Posts
    54
    Thanks
    4
    Thanked 4 Times in 4 Posts


  •  

    Posting Permissions

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