Michelle Brose

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMichelle Brose
ToMe
Subjectnested list collapsing script
Date23 June 2004 08:03
First and foremost, thanks for making your scripts available to the 
public!  I just tried your nested list collapsing script, and it worked on 
the very first try for me ... fabulous :)
    Now to my questions:

1)  Is there any way to move that character to the right of the list item, 
instead of the left?

2)  I applied your script to my nested list, and then styled it following 
this example.
http://xxx.xxxxxxxxxx.xxx.xx/xxxxxxxxxxx/xxxxxxxxxx.xxx
The results are here:
http://xxx.xxxxxxxx.xxx/xxxxx/xxxx.xxxx
Any idea why the character is on a new line each time?  Obviously it's 
related to the styling because it displays properly when I remove the 
stylesheet... but why?

Thanks,
Michelle
FromMe
ToMichelle Brose
SubjectRe: nested list collapsing script
Date23 June 2004 13:17
Michelle,

hmm, some interesting questions.

1) well, that is a lot more difficult than it sounds. but ....

2) you are using display: block; for links. the >> are done using links
when there are two links (>> and your existing links) the two links both
take up the full width of their parent
so they both nead their own line.

Both of these could be solved by using floats to style the expand links:
in the script, under the line
var newLink = document.createElement('A');
add the line
newLink.className = 'miniLink';
now, you can style those links specifically (I think I will add this in to
a future release by default)

#mysites a.miniLink
{
border-left: none;
border-bottom: none;
padding: 0px;
width: 10px;
text-align: center;
float: right;
}

I also found it was useful to change the width of #mysites from 12em to
17em, since some of your links are too big at the moment.

as a warning note, no two elements should share the same ID. use a class
instead


Hope this helps


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.