Results 1 to 2 of 2

Thread: Indentation for simple tree menu

  1. #1
    Join Date
    Dec 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Indentation for simple tree menu

    1) Script Title:
    Simple Tree Menu

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamicindex1/navigate1.htm

    3) Describe problem:
    I have the script working fine but for the life of me, I can't get the menu to align to the left side of the page. The menu is indented about 100+ pixels from the edge of the page and the submenus each indent an additional 100+ pixels.

    The question: how do I control the horizontal alignment of the menu tree?

    Here is the link to the offending page:
    http://thecreationcollege.org/simpleTreeMenu.html

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Add this to the top of your css code:
    Code:
     * {
        padding: 0;
        margin: 0;
    }
    You will still have some padding because of this code, which you can change to zero:
    Code:
    .treeview li { /*Style for LI elements in general (excludes an LI that contains sub lists)*/
        background: white url(images/yellow_arrow_right.gif) no-repeat left center;
        list-style-type: none;
        padding-left: 16px;
        margin-bottom: 3px;
        margin-left: 0px;
    }
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

Bookmarks

Posting Permissions

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