una / YouMightNotNeedJS

http://YouMightNotNeedJs.com
MIT License
1.84k stars 64 forks source link

More flexible tabs #65

Open catfive opened 7 years ago

catfive commented 7 years ago

Hi, love the site—great work!

I noticed that the tab containers are absolutely positioned, with min-height hardcoded.

Unfortunately, this leads to many issues, not the least of which is that longer content will overflow the container!

I've demonstrated an alternative here: http://codepen.io/anon/pen/ZpmKdA?editors=1100

I haven't heavily tested it in all browsers, but it solves most of the problems I ran into with the version on the site.

It was modified from the technique described here

I leave it to you to decide whether or not it's an improvement!