c0deM0nK424
Programmer
I have been implementing a drop down responsive css menu - and this was my first ever attempt at it, with the aid of one or two tutorials.
As always, im trying to learn and grasps whats going on by 'typing' and 'executing' code then 'observing' the results on a 'screen' to understand whats going on...though I am convinced that I am not taking the time out to sit down, and understand some of the fundamentals behind what certain css rules are actualy doing to certain elements that make up the menu.
either way , i believe my understanding of the theory is strong enough to at least bypass serious theory study and delve right into the 'coding' - which is why so many of us come onto forums becayse we are not getting teh balance right, in taking some time out to sit down and 'read' and 'understand' intimately the css bible..
Here is my problem - its fairly simple, ive made a percentage based responsive css drop down menu which, at the breaking point - snaps into responsive mobile friend mode ( simply making the li widths 100%).
basicaly the problem is the set up - im using the slideToggle method, and have given an id to the parent 'li' that houses the dropdown ul, which itself has a class. When I CLICK the dropdown menu , i want the drop down menu (sub menu) links to 'push' the main menu links down.
Instead they're just overlapping.
Hopefully this will make things clear for you all:
Q - what am i doing wrong , or simply what am i not doing ? is there something basic ive overlooked or is there a very simple mistake ive made somewhere ? Why , when the li that houses the ul.dropdown gets clicked, does the menu not push the main menu links downwards and instead overlaps them ??
id like to add, that i omitted the following from the media query at the bottom of the css which has no bearing to the question itself, but i wanted to mentioned it nonetheless incase i didnt need to delete those 3 lines.
ul li:hover ul.dropdown{
display:none; /* Dont Display the dropdown on hover! */ ;
}
ul li:active ul.dropdown{
display:none; position:absolute; height:auto; margin-top:2em;
}
ul li:focus ul.dropdown{
display:none; position:absolute; height:auto; margin-top:2em;
}
I omitted these 3 lines as i discovered they were not required ( the positions were all relative originaly but then changed to absolute for no reason other than the 'and lets see what happens when we change this to that' approach, something which has helped even the most accomplished intellectuals solve insanely puzzling problems. Sometimes we discover things by chance by just randomly changing stuff in code and when we see what happens we learn something new - and then we post a blog about what we've dsicovered. In this case, nothing was discovered heh.
so yeah, let me know whats up with the drop down menu folks. Would apprecaite it heaps.
ciao
As always, im trying to learn and grasps whats going on by 'typing' and 'executing' code then 'observing' the results on a 'screen' to understand whats going on...though I am convinced that I am not taking the time out to sit down, and understand some of the fundamentals behind what certain css rules are actualy doing to certain elements that make up the menu.
either way , i believe my understanding of the theory is strong enough to at least bypass serious theory study and delve right into the 'coding' - which is why so many of us come onto forums becayse we are not getting teh balance right, in taking some time out to sit down and 'read' and 'understand' intimately the css bible..
Here is my problem - its fairly simple, ive made a percentage based responsive css drop down menu which, at the breaking point - snaps into responsive mobile friend mode ( simply making the li widths 100%).
basicaly the problem is the set up - im using the slideToggle method, and have given an id to the parent 'li' that houses the dropdown ul, which itself has a class. When I CLICK the dropdown menu , i want the drop down menu (sub menu) links to 'push' the main menu links down.
Instead they're just overlapping.
Hopefully this will make things clear for you all:
Q - what am i doing wrong , or simply what am i not doing ? is there something basic ive overlooked or is there a very simple mistake ive made somewhere ? Why , when the li that houses the ul.dropdown gets clicked, does the menu not push the main menu links downwards and instead overlaps them ??
id like to add, that i omitted the following from the media query at the bottom of the css which has no bearing to the question itself, but i wanted to mentioned it nonetheless incase i didnt need to delete those 3 lines.
ul li:hover ul.dropdown{
display:none; /* Dont Display the dropdown on hover! */ ;
}
ul li:active ul.dropdown{
display:none; position:absolute; height:auto; margin-top:2em;
}
ul li:focus ul.dropdown{
display:none; position:absolute; height:auto; margin-top:2em;
}
I omitted these 3 lines as i discovered they were not required ( the positions were all relative originaly but then changed to absolute for no reason other than the 'and lets see what happens when we change this to that' approach, something which has helped even the most accomplished intellectuals solve insanely puzzling problems. Sometimes we discover things by chance by just randomly changing stuff in code and when we see what happens we learn something new - and then we post a blog about what we've dsicovered. In this case, nothing was discovered heh.
so yeah, let me know whats up with the drop down menu folks. Would apprecaite it heaps.
ciao