treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] css menu

  • Hey,

    I was looking for a nav bar menu style and buttons, and remebered css-tricks.com old theme design. I remembered especially the v8 version, well that one I think it is: Your text to link here...

    I never knew how you can achieve that effect, growing(expanding) the button on hover, and auto shrinking the others. Does it need an js or can it be achieved using only css?

    If you guys have any ideas or examples, that would be great! Thank you!

  • You can do it in CSS alone, even animated, but it will only be animated by modern browsers. (In older ones it will just jump.)

    Here's a quick demo.

  • I'm slow and I didn't use transitions but I'm also bored and made another demo... just for the sake of it here it is :P

    http://codepen.io/anon/pen/ujLct

  • Thanks guys, exactly what I was looking for, Cheers!

  • plz guys help me. I have a horizontal menu and vertical menu. Both menus are having styles for them. But when i placed them in the same page one is taking another one's styles. How to get both horizontal and vertical menus in same page ?

  • @rahiem

    Can you please create a new thread with your question rather than tacking on to a different subject.

    It would also be helpful to provide a link to your site or put a reduced version in Codepen

This discussion has been closed.
All Discussions