drop down menu works

This commit is contained in:
lenovo
2022-11-11 09:09:27 +01:00
parent cb0dcdddad
commit 55120b7504
2 changed files with 184 additions and 52 deletions

View File

@@ -14,7 +14,6 @@
#ljdp_map_filters {
position: relative;
border: 1px solid red;
width: 100%;
z-index: 1;
}
@@ -22,9 +21,37 @@
#ljdp_map_filters .filter_menu {
flex-direction: column;
width: 100%;
border: 1px solid blue;
border: 1px solid #ba197a;
}
/* **************************************
WIP VERSION SELECT
*/
/*
#ljdp_map_filters .filter_menu select.filter_menu_drop {
appearance: none;
text-align: center;
background-color: transparent;
border: none;
}
#ljdp_map_filters .filter_menu .filter_menu_drop option {
appearance: none;
text-align: center;
background-color: transparent;
border: none;
}
*/
/* **************************************
VERSION INPUT CHECKBOX
*/
/*
#ljdp_map_filters .filter_menu input.filter_menu_title {
display: none;
@@ -32,57 +59,128 @@
#ljdp_map_filters .filter_menu label.filter_menu_title {
width: 100%;
border: 1px solid green;
}
*/
#ljdp_map_filters .filter_menu .filter_menu_title {
width: 100%;
cursor: pointer;
border: 1px solid green;
}
#ljdp_map_filters .filter_menu .filter_menu_drop {
/*
display: none;
*/
flex-direction: column;
position: absolute;
top: 0%;
top: 100%;
left: 0px;
margin: 0px;
padding: 10px 0px;
width: 100%;
max-height: 400px;
background-color: #ffffff;
overflow-y: scroll;
cursor: pointer;
}
#ljdp_map_filters .filter_menu input.filter_menu_title:checked
~ .filter_menu_drop {
display: flex;
}
#ljdp_map_filters .filter_menu .filter_menu_drop p {
padding: 0px 10px;
width: 100%;
}
#ljdp_map_filters .filter_menu .filter_menu_drop p:hover {
background-color: #dddddd;
}
*/
/* **************************************
VERSION DIV STICK
*/
/*
#ljdp_map_filters .filter_menu .filter_menu_title {
width: 100%;
cursor: pointer;
}
#ljdp_map_filters .filter_menu .filter_menu_drop {
display: none;
flex-direction: column;
position: absolute;
top: 100%;
left: 0px;
margin: 0px;
padding: 10px 0px;
width: 100%;
max-height: 400px;
background-color: #ffffff;
overflow-y: scroll;
cursor: pointer;
}
#ljdp_map_filters .filter_menu:focus-within .filter_menu_drop {
display: flex;
}
#ljdp_map_filters .filter_menu .filter_menu_drop p {
padding: 0px 10px;
width: 100%;
}
#ljdp_map_filters .filter_menu .filter_menu_drop p:hover {
background-color: #dddddd;
}
*/
/* **************************************
VERSION DIV SWITCH
*/
/*
*/
#ljdp_map_filters .filter_menu .filter_menu_title {
width: 100%;
cursor: pointer;
}
#ljdp_map_filters .filter_menu .filter_menu_drop {
flex-direction: column;
position: absolute;
left: 0px;
margin: 0px;
width: 100%;
max-height: 400px;
cursor: pointer;
border: 1px solid pink;
/* padding-top must be sufficient to hide the menu */
padding: 100px 0px 0px 0px;
height: 0px;
background-color: transparent;
overflow: hidden;
border: none;
/*
overflow: visible;
*/
}
/*
#ljdp_map_filters .filter_menu input.filter_menu_title:checked
~ .filter_menu_drop {
display: flex;
background-color: transparent;
height: 100%;
top: 0%;
overflow: hidden;
}
*/
#ljdp_map_filters .filter_menu .filter_menu_drop:focus {
top: 100%;
background-color: #ffffff;
overflow: scroll;
height: auto;
padding: 10px 0px;
top: 100%;
overflow: scroll;
border: 1px solid #ba197a;
}
#ljdp_map_filters .filter_menu .filter_menu_drop p:first-child {
margin-top: 100px;
}
#ljdp_map_filters .filter_menu .filter_menu_drop:focus p:first-child {
margin-top: auto;
}
#ljdp_map_filters .filter_menu .filter_menu_drop p {
margin: 0px auto 0px 0px;
padding: 0px 10px;
width: 100%;
}