The main menu is not displaying on mobile devices when in portrait orientation

Currently delving into the world of CSS/HTML for mobile devices, I've encountered an issue with my site. It looks great on desktop, but on a mobile device, the menu disappears. However, when switched to landscape mode, the menu magically reappears. Any insights on why this might be happening?

Here's a snippet of the menu code:

<div class="menu_block ">
    <div class="container_12">
        <div class="grid_12">
            <nav class="horizontal-nav full-width horizontalNav-notprocessed">
                <ul class="sf-menu">
                    <li <a href="index.php"><img src="images/logo.png" alt="wake up rentals"></a></li>
                    <li class="current"><a href="index.php">Home</a></li>
                    <li><a href="rental.php">Rentals</a></li>
                    <li><a href="lakes.php">Lakes</a></li>
                    <li><a href="Register.php">Rent Now</a></li>
                    <li><a href="FAQ.php">FAQ's</a></li>
                    <li><a href="Login.php">Login</a></li>
                    <li><a href="Contact.php">Contact Us</a></li>
                </ul>
            </nav>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
</div>

Here is the CSS for the Menu Block:

.menu_block  {
    z-index: 999;
    position: relative;
    background: url(../images/menu_bg.png) 0 0 repeat-x #d8d8db;
    padding: 12px 0 11px;
}

... (CSS rules continue)

To view the complete Container_12 and Grid_12 CSS code, check out the following links:

Container_12 / some grid_12 CSS https://pastebin.com/tup8Psis

Grid_12 CSS https://pastebin.com/qxAswhVc

I have provided the links to the CSS files for easier readability. If you believe more information is necessary, feel free to let me know.

Answer №1

Your UL element is currently set to "Display None" when the screen width is at most 767px.

@media only screen and (max-width: 767px)
.sf-menu {
    display: none !important;
    /* float: none; */

This is causing your menu to be hidden, so consider removing the "Display None" property from your UL.

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

Identifying issues in jQuery code - What could be causing this error?

My jQuery code is not responding at all, not even showing an error! I'm not sure why, but here is the jQuery Code I'm using: /* This part is working fine */ $(".add-blog .blog-add-form .add-article .input-group select").on("change", function() ...

The makeSVG function from GoJS is failing to generate the correct HTML SVG object

I have been utilizing the Diagram.makeSVG() method to create an SVG from my diagram. Subsequently, I appended the SVG to a new empty tab using this script (diagram represents my Diagram Object): function print() { var newTab = window.open(), svg ...

Is there a way to align my text to the right of an image?

My current code is displaying an image https://i.sstatic.net/Nmnr6.jpg I want it to show a different image instead: https://i.sstatic.net/MH7sR.jpg This is the HTML code I'm using: </div> <div class= "Row1"> <h2>Looking ...

Dreamweaver constantly combines an external CSS file with locally stored CSS when running on a local server

When I used Dreamweaver CS5, XAMPP Server, and PHP files in the past, I encountered an issue. The websites within my htdocs folder seemed to be pulling a specific website's CSS file. In 'Live View,' I could see all external .css and .js file ...

Leveraging scrapy for pinpointing the accurate information within tables

I am facing a challenge with extracting text from a website that features multiple tables. My goal is to create a layout where the content spans across multiple pages, but the issue lies in the unpredictable nature of the xpath for these tables. The xpath ...

Unforeseen behavior in Ajax success callback

My unordered list contains a href link. Initially, only the welcome page is visible on page load. Upon clicking the list for the first time after page load, the desired results are displayed in the corresponding div as expected. The issue arises when swi ...

Steps to show the default value in a text box and add additional input after clicking a button

Hello there! I need help with my HTML project again. In my script, I have a button command to display input values in boxes. I want these input boxes to show default values of Model, IMEI, and Serial when no input is detected upon button click. And when ...

Is it possible for a video embedded in a PDF to play when displayed in html?

Here's my dilemma! Is it possible for a video inserted in a PDF to play when displayed in HTML using any available viewers (such as jquery, javascript, or flash) for viewing PDFs in HTML or HTML5...? After scouring the internet, I could not find any ...

I'm having trouble locating the container with only one child element in JavaScript

I am currently working on a project where I need to locate a specific container using JavaScript. More specifically, I am looking to target the container that houses the required address. My aim is to assign a class to the container of the requested addre ...

Fade in images smoothly

Currently, I am in the process of creating a visually appealing image "slider" for a landing page on one of my websites. The slider that I have already created is fully functional and successful, but I am looking to take it up a notch... My goal is to inc ...

Enhance the current bootstrap sidebar by making it collapsible

My project is built in bootstrap and features a top navigation bar along with a sidebar. I would like to make the sidebar collapsible, similar to this example: The only challenge is that the sidebar in my project is positioned on the left side of the pag ...

How can I delete the header and footer on a personalized homepage design?

After crafting a unique home page/landing page for my website that stands out from the rest, I've come across an issue. The header and footer are appearing on this new page, but I only want to display what I specifically coded. I attempted using Site ...

Is there a way to execute jQuery code only after AngularJS has finished rendering all its components?

My goal is to display or hide my chart div based on different pages (Add, Edit, Save As). This functionality should be controlled by a checkbox - when the checkbox is checked, the div is displayed, and when it is unchecked, the div is hidden. On the Add ...

Switching the angularjs variable from html; a definitive guide

How can I update a variable in an AngularJS controller using JavaScript when a specific HTML element is clicked? For instance: angular.module('app',[]) .controller('appController', function($scope, $http){ $scope.on ...

Tips for shifting icons from the left to the right when collapsing a sidebar menu

Trying to solve a challenge with the sidebar width transition! How can I move icons to the right only when the sidebar is at a width of 50px, within the specified area? The current look: https://i.sstatic.net/GIc4n.png Desired outcome: https://i.sstati ...

Determine if a file input is linked in React.js Material UI

Currently, I am working with a Material UI <TextField /> component that has a type=file prop to allow file attachments. My goal is to trigger an event when a file is attached to this TextField. However, my search results only provided JQuery soluti ...

Why isn't the CSS outline property functioning properly within the handlebars?

I am working on a login form within a Handlebars page and I am trying to figure out how to set the default outline property to none for that particular element. Does anyone know how to do this? Snippet of code from the Handlebars file <input type=" ...

Safari is unable to display the button text, while Chrome has no problem showing it

In Safari, the text of the button is not showing up properly. I am able to retrieve the text using jQuery in the console though. However, there seems to be an issue with recognizing the click event. <div class="btn-group btn-group-lg"> <button ...

Resize Font Awesome icons dynamically based on screen size changes

Currently working on creating a footer that includes social media icons from Font Awesome. However, I've come across an issue where resizing the desktop size for tablet or mobile screens causes the icons to shrink, which is not ideal. If anyone has a ...

"Vanishing act: The mystery of the disappearing Bootstrap dropdown

I am currently using Bootstrap 3 in conjunction with Ruby on Rails through the Rails Tutorial Sample App. Within my application, users have the ability to like, or "savor," microposts, referred to as "pops." My goal is to display Gravatar icons of users wh ...