Collapsable menus

Discussion in 'Javascript' started by tim, Feb 10, 2007.

  1. tim

    tim Guest

    I am creating a menu tree using a unordered lists using a script
    called 'simplemenu' that i have come accross and just have a couple of
    problems with it.

    I was originally using a javascript based script named 'foldoutmenu'.
    I was informed that it wasn't the best script and i have changed to
    use a more simple css based script.

    1> I have three main problems, firstly, I would like each menu to
    collapse when the next one is opened alike my original 'foldoutmenu'.

    2> I would also like to find a way of altering the spacing/ padding to
    look like the first attempt. can i control this using css?

    3>I would also like to control the width of the text in the menus. I
    would like it to be set to 400px. Is this something that i can change
    in the css?

    The 'simplemenu' that i am using now can be seen at; http://
    www.geocities.com/timdenton3000/

    The first 'foldoutmenu' that i have now ditched can be seen at: http://
    www.geocities.com/timdenton3000/old/index.htm

    Any help/advice on either of these problems would be much appreciated.

    Many thanks

    Tim
    tim, Feb 10, 2007
    #1
    1. Advertising

  2. tim

    pcx99 Guest

    tim wrote:
    > I am creating a menu tree using a unordered lists using a script
    > called 'simplemenu' that i have come accross and just have a couple of
    > problems with it.
    >
    > I was originally using a javascript based script named 'foldoutmenu'.
    > I was informed that it wasn't the best script and i have changed to
    > use a more simple css based script.
    >
    > 1> I have three main problems, firstly, I would like each menu to
    > collapse when the next one is opened alike my original 'foldoutmenu'.
    >
    > 2> I would also like to find a way of altering the spacing/ padding to
    > look like the first attempt. can i control this using css?
    >
    > 3>I would also like to control the width of the text in the menus. I
    > would like it to be set to 400px. Is this something that i can change
    > in the css?
    >
    > The 'simplemenu' that i am using now can be seen at; http://
    > www.geocities.com/timdenton3000/
    >
    > The first 'foldoutmenu' that i have now ditched can be seen at: http://
    > www.geocities.com/timdenton3000/old/index.htm
    >
    > Any help/advice on either of these problems would be much appreciated.
    >
    > Many thanks
    >
    > Tim
    >


    I think what you're asking for is too much like "writing the application
    for you" to get much help from the newsgroup. But if you would like to
    see just what css can do, you could do much, much, much worse than
    checking out A List Apart's menu tutorials. (
    http://search.atomz.com/search/?sp-q=menu&x=0&y=0&sp-a=sp1002d27b&sp-f=ISO-8859-1&sp-p=All&sp-k=All
    ) They pretty much go from full blown CSS menus that degrade gracefully
    all the way back to the first browsers ever made.

    But to answer 2 & 3, yes CSS can let you alter spacing/padding and
    width. style="width: 400px; padding: 5px;" will set the width, of the
    element to 400px and create an inner padding layer 5pixels deep.



    --
    http://www.hunlock.com -- Musings in Javascript, CSS.
    $FA
    pcx99, Feb 12, 2007
    #2
    1. Advertising

  3. tim

    tim Guest

    Hi pcx99

    Thanks for the reply, granted, i am perhaps asking a bit much.

    I have previously had a good look through alistapart, and there are
    some really nice examples there, only im not sure that any of them fit
    in with what im trying to do. And unfortunately i dont have the
    knowledge to manipulate the codes to my requirments.

    Thanks for the help with the css spacing, i'll continue to work out
    the collapsability of the menus.

    Many thanks

    Tim
    tim, Feb 12, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Henry

    collapsable lists?

    Brian Henry, Mar 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    382
    Joseph Byrns
    Mar 31, 2005
  2. Rlrcstr

    Collapsable paragraphs...

    Rlrcstr, May 16, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    673
    Rlrcstr
    May 17, 2005
  3. Replies:
    2
    Views:
    440
    Andy Dingley
    May 20, 2005
  4. Savvoulidis Iordanis
    Replies:
    1
    Views:
    2,191
    Michael Nemtsev [MVP]
    Feb 23, 2008
  5. Heath P. Dillon

    how to do expandable / collapsable sections

    Heath P. Dillon, Dec 18, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    3,253
    Alexey Smirnov
    Dec 19, 2008
Loading...

Share This Page