PDA

View Full Version : Indentation for simple tree menu



schabetc
12-29-2008, 02:03 PM
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

Snookerman
12-29-2008, 03:19 PM
Add this to the top of your css code:

* {
padding: 0;
margin: 0;
}
You will still have some padding because of this code, which you can change to zero:

.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;
}