What's your biggest current challenge? Have your say in Community Polls along the right column.

How can I display the mobile menu on desktop at all times?

How can I display the mobile menu on desktop at all times?

DAGNORAK
Excursionist
69 0 6

IMG_7358.jpeg

My mobile header, with logo menu and cart button looks much better on desktop than the desktop header. I can see this when I resize my screen. How do I make the mobile header always show regardless of screen size ? Thanks 

Reply 1 (1)

shahzad23
Visitor
2 0 0

To make a mobile menu always show on desktop, you'll typically need to modify your website's CSS (Cascading Style Sheets) to override the default behavior. Here's a simple example using HTML and CSS. Please note that the specific implementation may depend on your website's structure and the framework or platform you are using:

HTML structure:

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Your Website</title>
</head>
<body>

<!-- Your website content -->

<div class="mobile-menu">
<!-- Your mobile menu content -->
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>

</body>
</html>
```

CSS (styles.css):

```css
/* Your existing styles */

.mobile-menu {
display: block; /* Ensures the mobile menu is always visible */
}

/* Add any additional styling you need for the mobile menu */
.mobile-menu ul {
list-style: none;
padding: 0;
margin: 0;
}

.mobile-menu li {
display: inline-block;
margin-right: 15px;
}

.mobile-menu a {
text-decoration: none;
color: #333;
font-weight: bold;
}
```

In this example, the `.mobile-menu` class is set to `display: block;` to ensure that it is always visible. You may need to adjust the styles based on your specific requirements and the existing styles on your website.

If your website uses a specific framework or content management system (CMS), the implementation might differ. Always remember to make a backup before making changes to your website's code, and test thoroughly to ensure the desired behavior. If you're not comfortable making these changes, consider seeking assistance from a web developer.