Tips for setting up the Top Menu and Left Side Menu in your system

You're looking to incorporate both the Top Menu and Left Side Menu.

The top menu should remain fixed at the top of the page.

Implementing the Left Side Menu below the Top Menu has been a challenge. It's currently covering the top menu, which is not intended.

If we open the Left Side Menu, we need it to appear right under the Top Menu without overlapping. Any suggestions?

  • index.html code
<!DOCTYPE html>
<html lang="en">
<head>
    ...
    ... (rest of the HTML code)
    ...
</body>
</html>
  • left_sidemenu.css code
/* Custom CSS for the left side menu */

...

... (rest of the CSS code)

...
  • left_sidemenu.js code
/* JavaScript functionalities for the left sidemenu */ 

function showMenu() {
  // Code snippet for showing the left sidemenu
}

// Additional scripting for link colors and collapse functionality

...
  • top_menu.css code
/* Styling for the top menu */

...

... (remaining CSS styles for the top menu)

...

View Screenshot 1

View Screenshot 2

Answer №1

The issue you are experiencing is due to the excessive padding added to the top_menu item in your code. To address this, simply reduce the padding specified in the top_menu.css file:

body { 
    margin: 0;
    background-color: var(--bodybackground-color);
    font-family: 'STIX Two Math';
    padding-top: 45px;
}

Additionally, if the expanded nav bar overlaps with the header, it may be caused by padding applied to an existing element. Consider modifying the left_sidemenu.css file as follows:

/* Adjust body padding */
.body-pd {
    /* padding: rem 0 0 16rem; */
}

Alternatively, you can avoid adding top padding altogether to prevent the nav bar from overlapping vertically. Another suggestion would be to adjust the z-index so that the nav bar appears behind the header.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Exploring Request Parameters in SailsJS

I am facing an issue with logging requests in my Sails app. While I have managed to log the requests successfully, I am unable to log the parameters of the request. myRequestLogger: function(req, res, next) { if (sails.config.environment === & ...

Modify route title and component if user is authenticated

I've successfully implemented a login feature in my Nativescript-Vue application that utilizes the RadSideDrawer component. My current challenge is to change the route from 'Login' to 'Logout', and I'm struggling to find a wa ...

Guide to initializing the state in pinia with Typescript

I am encountering an issue while trying to add typescript to a pinia store. Any suggestions on how to resolve this problem would be appreciated. The project currently utilizes pinia:^2.0.16 and Vue:3.2.37 The error message is as follows: Type '{}&a ...

Utilizing Three.js Texture with shaderMaterial

I'm encountering an issue where I can't seem to load a texture onto my shader material, resulting in just black dots appearing. Here's the code snippet from my shader.js: THREE.ShaderLib['cloud'] = { uniforms: { textu ...

Executing Javascript on Selenium RC with PHP is a crucial skill to have in your toolkit

Is there a way to execute Javascript from Selenium RC? I have been trying different methods with no success so far. I attempted the following approach: I created a custom function in user-extensions.js: function sayhello() { document.write('hel ...

Creating complex concave shapes using Three.js from a point cloud

Currently facing a challenge in dynamically creating shapes in three.js from a point cloud. While ConvexGeometry works well for convex shapes, it becomes complex when dealing with concave shapes. The process involves drawing a line on the 2D plane (red li ...

How to style a div for printing using CSS

Currently, I am working on a project that has already been completed but now requires some enhancements. To give you an overview, the project includes a search functionality that displays additional details upon clicking on the displayed name in the result ...

Revealing child elements by expanding the absolute div from the center

I am trying to create a rectangular mask that expands on hover to display its children with varying heights. Currently, I have achieved this using an absolutely positioned div that adjusts its left, width, and max-height properties. However, I would like i ...

Issues with Mega Menu functionality preventing items from being clickable and links from properly navigating

Recently, I encountered a strange issue related to the integration of a mega menu found at . Unfortunately, despite integrating the mega menu, the Category and sub category links seem unresponsive - they are not directing me to the desired links. I suspec ...

Utilizing the static folder feature in Express on a shared hosting platform

Struggling with implementing a static folder in my Node.js+Express application, I keep encountering a frustrating 404 error. After setting up the basic structure using express project_name, here is the simplified folder layout: app.js /views \-- la ...

Is there a way to change the visibility of a form element within a directive with the help of

Consider a scenario where you have a basic form as shown below: <form ng-submit="methods.submit(formData)" ng-controller="diamondController" name="diamond" novalidate> <help-block field="diamond.firstName"></help-block> <input ...

Storing and Manipulating a JavaScript Object with Vuex: A New Perspective

Consider a hypothetical JavaScript object class like this: class Car { var engineTurnedOn = false; ... public turnEngineOn() { engineTurnedOn = true } } If I want to turn the engine on, should I create an action called 'turnEngineOn&ap ...

How do you display a nested object in React after merging it?

To display the JSON below as an image, click https://i.stack.imgur.com/tixu4.png let finalSplit = [ { start: "73", end: "76", splits: [ { word: "Now", start: "73", ...

Learn how to use CSS flexbox to easily vertically center items within a container with a full-height background

I'm having trouble with aligning text vertically centered within a box and making sure the background color stretches to full height. HTML: <div class="feature-content"> <div class="feature-visual"> <div class="embed-container"> ...

What is the best way to conceal the outline in a popup window?

I have successfully implemented a popup/modal window using JavaScript, but now I need to find a way to hide the outline map container. The initialization code for the map is as follows: self.mapDialogOptions = { autoOpen: false, m ...

Unusual occurrence while creating a unique identifier for a React component

I am working on creating a unique identification number for each React component, which will be assigned to the component upon mounting. Here is the approach I am taking: The callOnce function is used to ensure that a specific function is only executed on ...

Issue with Textarea not updating when props change in a React component

I am facing an issue with updating the default value of a textarea based on props passed from a parent component. Strangely, the update works when using 'value' but not when using 'defaultValue'. However, I need the textarea to be edita ...

Attempting to spread a non-iterable instance is invalid. For non-array objects to be iterable, they must have a [Symbol.iterator]() method

data(){ return { tables:[] } }, mounted(){ this.fetchData() }, methods:{ fetchData(){ var subscription = web3.eth.subscribe('logs', { address: '0x123456..', topics: ['0x12345. ...

Error messages from the Outlook Web add-in are presented as helpful information

I need assistance in showing error notifications. Here is my code: Office.context.mailbox.item.notificationMessages.addAsync("error", { type: "errorMessage", message: "The add-in encountered an issue while processing this message." }) The respons ...

Tips for sending a tab id to a URL using jQuery

Upon examining the code snippet below, it is apparent that I am attempting to pass the value of a tab's id to a URL. In this instance, I am displaying it in HTML just for illustrative purposes; however, the hashtag id fails to be transferred to the UR ...