Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: I want to reduce indentation at simple tree menu---please Help

  1. #1
    Join Date
    Jul 2006
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I want to reduce indentation at simple tree menu---please Help

    1) Script Title: Simple Tree Menu Author: Dynamic Drive

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

    3) Describe problem: I want to reduce indentation at simple tree menu---please Help.

    Hello,

    I need help for the following matter ( please help ). To understand the problem please see the attached picture and the following test website:

    http://userwww.sfsu.edu/~iamhappy/Te...ates/page3.htm.

    At the simple tree menu, the whole menu starts after 25-50 pixels of indentation. I know that this happens as we are using list elements. Is there a way so that the menu starts after 5 or 7 pixels of indentation instead of starting after a long indentation.

    The main question is: how to control the indentation of the simple tree menu so that I can control the indentation. Thank you for reading.

    Please reply.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Read the CSS file, you'll see:
    Code:
    .treeview li{ /*Style for LI elements in general (excludes an LI that contains sub lists)*/
    background: white url(list.gif) no-repeat left center;
    list-style-type: none;
    padding-left: 22px;
    margin-bottom: 3px;
    }
    Change the number in red.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2006
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello Twey,

    thanks a lot for reply, but I tried that approach all ready.

    If I do that, the inner elements get indented; for example, item 3, item 4, page3, page 4 gets indented more toward left.

    but I want the very first elements ( Source Doc ) or Folder 1, Folder 2, or Page 1to get indented and start with less indentation. I hope that you understand my problem. Is it fixable? Please reply.

    Thank you.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I think I understand what you're saying. If I'm right, the easiest method is to apply a change as above, then override it for lower elements:
    Code:
    .treeview li li {
      padding-left: 22px;
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2006
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile I have benn trying

    Quote Originally Posted by Twey
    I think I understand what you're saying. If I'm right, the easiest method is to apply a change as above, then override it for lower elements:
    Code:
    .treeview li li {
      padding-left: 22px;
    }
    Hello,

    thank you so much for trying to help here.

    I've tried with your advice, but I cannot get the desired affect. Today I will not be able to connect with my server; so, I will not be able to show you what result I am getting.

    However, I am getting this following result, which is not the effect I want. Although the list gets indented, but the menu item gets on top of the picture; for example, the word Folder 1 goes on top of the Folder picture. I tried to modify the li and uls but the menu items gets on top of the 'open folder' and on top of the 'close folder' picture.

    So, it seems that I have to indent the 'floder' pictures. Please tell me how to indent the pictures so the whole menu starts with less indentation but also has its open folder, close folder, and its arrow images in their respective places.

    Thank you.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I'm not entirely sure what you're describing. Can you put a demo page somewhere? Sign up for a free account, Geocities or Freewebs or something, if you still can't get your webspace working.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jul 2006
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hello, please help me with indentation in the simple tree menu

    Quote Originally Posted by Twey
    I'm not entirely sure what you're describing. Can you put a demo page somewhere? Sign up for a free account, Geocities or Freewebs or something, if you still can't get your webspace working.

    Hello,
    thank you agiain for reading this thread.

    I am explaining the problem. Please visit the page at the following address:

    http://userwww.sfsu.edu/~iamhappy/Templates/page1.htm

    and then, please, visit this page:

    http://userwww.sfsu.edu/~iamhappy/Templates1/page1.htm

    At the first Demo, I tried to modify the css file as follows, as you have suggested:

    .treeview ul{ /*CSS for Simple Tree Menu*/
    margin: 0;
    padding: 0;
    }

    .treeview li li{ /*Style for LI elements in general (excludes an LI that contains sub lists)*/
    background: url(flower-dot.png) left 2px;
    background-repeat:no-repeat;
    list-style-type: none;
    padding-left: 18px;
    margin-bottom: 3px;
    }


    .treeview li.submenu{ /* Style for LI that contains sub lists (other ULs). */
    background: url(closed.gif) left 1px;
    background-repeat:no-repeat;
    cursor: hand;

    }


    .treeview li.submenu ul{ /*Style for ULs that are children of LIs (submenu) */
    display: none; /*Hide them by default. Don't delete. */
    }

    .treeview .submenu ul li{ /*Style for LIs of ULs that are children of LIs (submenu) */
    cursor: hand;
    }



    .....and as you can see, the word "Folder 1" is at top of the image of Folder. So, the words and the images get overlapped.

    So, I need to indent the image also so that the text were not goes at top of the image.

    Please help me so that I can move the whole menu toward left as much as possible ( so that it can have less indentation) with the images ( openfolder image, closefolder image, and arrow image).

    Please help. Thank you.

  8. #8
    Join Date
    Jul 2006
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Someone help please

    Quote Originally Posted by sharmin
    Hello,
    thank you agiain for reading this thread.

    I am explaining the problem. Please visit the page at the following address:

    http://userwww.sfsu.edu/~iamhappy/Templates/page1.htm

    and then, please, visit this page:

    http://userwww.sfsu.edu/~iamhappy/Templates1/page1.htm

    At the first Demo, I tried to modify the css file as follows, as you have suggested:

    .treeview ul{ /*CSS for Simple Tree Menu*/
    margin: 0;
    padding: 0;
    }

    .treeview li li{ /*Style for LI elements in general (excludes an LI that contains sub lists)*/
    background: url(flower-dot.png) left 2px;
    background-repeat:no-repeat;
    list-style-type: none;
    padding-left: 18px;
    margin-bottom: 3px;
    }


    .treeview li.submenu{ /* Style for LI that contains sub lists (other ULs). */
    background: url(closed.gif) left 1px;
    background-repeat:no-repeat;
    cursor: hand;

    }


    .treeview li.submenu ul{ /*Style for ULs that are children of LIs (submenu) */
    display: none; /*Hide them by default. Don't delete. */
    }

    .treeview .submenu ul li{ /*Style for LIs of ULs that are children of LIs (submenu) */
    cursor: hand;
    }



    .....and as you can see, the word "Folder 1" is at top of the image of Folder. So, the words and the images get overlapped.

    So, I need to indent the image also so that the text were not goes at top of the image.

    Please help me so that I can move the whole menu toward left as much as possible ( so that it can have less indentation) with the images ( openfolder image, closefolder image, and arrow image).

    Please help. Thank you.


    Someone, Twey, mburt, others, or ddadmin, please help me to solve this problem. I tried, and I cannot solve it. I need to understand and solve it.

    Thank you.

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Well, there's always the easy way out:
    Code:
    .treeview ul{ /*CSS for Simple Tree Menu*/
    margin: 0;
    padding: 0;
    position: relative;
    left: -15px;
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    The easy way out isn't necessarily the best way out
    - Mike

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
  •