|
|
#1 | ||
|
Platinum Member
![]() |
I wanted a quick dropdown for my website navigation that wasn't scripted, and zero flash. After reading about it, I drilled the code down to only the basics so I could build from that.
So, without further ado, the code below is the CSS-only dropdown menu styled just enough to make the concept look like something you'd expect to use: HTML Quote:
Quote:
Hope some of you find this useful. EDIT: Added :active pseudo-class to make it touch-friendly. Last edited by ronaldroe; 04-12-2011 at 02:47 AM. Reason: Now with with more touch-friendliness!! |
||
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: Mar 2010
Location: Auckland, New Zealand
Posts: 326
|
Hi ronaldroe,
Any chance you could elaborate on "EDIT: Added :active pseudo-class to make it touch-friendly" for us? I've never heard of this one before.. |
|
|
|
|
|
#3 |
|
Platinum Member
![]() |
Basically, I took a shot it the dark and copied the bit of code that makes the menu appear on hover, and changed :hover to :active. Turns out it works. On my website, when you tap "portfolio", at least on my iPhone, it opens the dropdown. Once I did that, I added it here so it would work for other people too. If you look at the last 2 blocks of the CSS, they're nearly identical, except the pseudo-class.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|