Although I am not a web designer by profession, I currently study copywriting and animation in college. I have teamed up with a close friend who specializes in graphic design and website development. Our current dilemma revolves around the excessive length of our website menu, which distorts the layout on mobile devices as shown in the image below.
The menu is situated near the top of the website and utilizes Javascript to fix itself at the top of the page when users scroll down. While this feature ensures a normal viewing experience while scrolling, it also creates an unwanted white space on the original position of the menu. This issue might be due to its extended length, but we are seeking assistance to rectify this anomaly. Your expertise would be greatly appreciated.
You can access the problematic page HERE, although the live link will be removed after resolving the issue for future reference.
This section outlines the CSS code governing the behavior of the menu in both its default and fixed positions upon user scrolling:
#menu, #menu ul {
margin: 0 auto;
padding: 0;
background-color: #FFFFFF;
}
#menu {
display: table;
width: 100%;
list-style: none;
position: relative;
top: -30px;
text-align: center;
-webkit-box-shadow: 0px 3px 5px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 0px 3px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: 0px 3px 5px 0px rgba(50, 50, 50, 0.75);
font-size: 18px;
height: 20px;
z-index: -101;
}
#menu.fixed {
position: fixed;
top: 0;
width: 100%;
}
#menu li {
display: table-cell;
list-style: none;
padding-right: 50px;
left: 50px;
vertical-align:middle;
}
#menu > li:hover > ul {
background:#FFF;
display: block;
left: 0;
width: 100%;
-webkit-box-shadow: 0px 3px 2px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 0px 3px 2px 0px rgba(50, 50, 50, 0.75);
box-shadow: 0px 3px 2px 0px rgba(50, 50, 50, 0.75);
border-top:thin dotted #999;
top: 32px;
}
#menu > li > ul {
display: none;
position: absolute;
text-align: center;
}
#menu li a {
display: block;
padding: 2px 10px;
text-decoration: none;
font-weight: lighter;
white-space: nowrap;
color: #333;
}
#menu li a:hover {
color: #CCC;
font-size: 18px;
vertical-align: middle;
}
#menu li ul li {display: inline-block;
float:none; }