PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Sep 24, 2020 4:47 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Fri Aug 07, 2015 10:08 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
Syntax: [ Download ] [ Hide ]
.admin_listproducts ul li:hover ul {
  display: block;
  opacity: 1;
  visibility: visible;
width: 130px;
  z-index: 2;
-webkit-box-shadow: 0px 5px 5px -7px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 10px 5px -7px rgba(0,0,0,0.75);
box-shadow: 0px 7px 5px -5px rgba(0,0,0,0.75);
}


I have this part of a CSS Class. It makes a menu popup when hovering over the DIV. But it wont' work for mobile.

So can it be altered so it works on Click instead? the DIV appears over the top of other stuff.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Fri Aug 07, 2015 2:43 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
Using Javscript would be the easiest. Have you tried using :focus or :active in addtion to :hover?

_________________
(#10850)


Top
 Profile  
 
PostPosted: Fri Aug 07, 2015 2:46 pm 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
Active wont' work as it only makes it popup when the click is 'down'. So rubbish for mobile friendly.
Would focus work then??

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 6:47 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada

_________________


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 6:52 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
Really? So if you want a click on it to make the menu popup... how are you meant to click the links n the menu, if when you "unclick" the mouse, the menu disappears as it's no longer "active"?

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 6:58 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Yeah, I was thinking JS .click rather than CSS :active. My mistake.

_________________


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 7:11 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
So I don't know how to do that.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group