Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorjpanaia
    • CommentTimeFeb 26th 2008
     permalink
    Hi, hope you can help.

    I'm designing a css photo gallery based on a template I found on this website: http://www.cssplay.co.uk/menu/slide_show.html

    It's perfect except for one thing - I want the gallery opened initially instead of having to hover over one of the labels (although the pop out is a cool feature). I have tried commenting out display:none on the list item that contains the thumbnail window but that throws the layout into disarray. Any advice?

    Thanks,
    Jaime
    • CommentAuthordave_o
    • CommentTimeFeb 26th 2008 edited
     permalink
    Hi Jaime,

    the key to the solution of your problem are the following code lines:
    /* make the dropdown ul invisible */
    .menu2 ul li ul {
    display: block;
    }

    .menu2 ul li + li ul {
    display: none;
    }

    The first decleration unhides all gallery pages from the beginning on. The second one hides all pages following the first one. Result: Only the first page is visible from the beginning on. Behavoir of the gallery stays the same. If You leave the menu with the mouse, the first page becomes visible again.

    However, in this form, the layout collapses. Why? Because, if you want to hide a page, you just have to set display:none. Whereas, if you want to unhide a page, you have to set much more css attributes which all controll the layout:

    .menu2 ul li:hover a {...}
    .menu2 ul li:hover ul {...}
    .menu2 ul li:hover ul li {...}
    ...(just watch them all up in the css file)

    Just add .menu2 ul li a, .menu2 ul li ul, .menu2 ul li ul li, etc. (all the same, but without :hover at the li) to the selectors above, so that the first gallery page is being rendered correctly.

    Example:
    .menu2 ul li:hover a, .menu2 ul li a {...}
    .menu2 ul li:hover ul, .menu2 ul li ul {...}
    .menu2 ul li:hover ul li, .menu2 ul li ul li {...}
    ...

    hope I could help you.
    Dave.
Add your comments
    Username Password
  • Format comments as (Help)