I am facing an issue with my dropdown navigation bar where elements such as buttons or images get pushed to the right side when the drop-down options appear. How can I prevent this from happening?
Navbar:
<nav id="nav1">
...
CSS:
nav#nav1 li a {
display: block;
padding: 3px 8px;
...
}
...
JavaScript functions for dropdown:
function DropDown2() {
var t = document.getElementById("Droplist2");
t.className = "DropDown";
}
...
If you are wondering why I have taken a complex approach in creating the navigation bar, it is because I need to incorporate JavaScript.
Here is JS fiddle example: http://jsfiddle.net/fNPvf/10015/
In the JS fiddle, notice how the dropdown menu pushes the content downwards when hovering over "Data Validation".