What differentiates my menu to be displayed horizontally?

How can I make my menu horizontal? On mobile, I want to have a vertical menu but I can't seem to figure out how. Here is my website for reference. When the window width is less than 800px, a 3-line menu appears. However, after clicking on it, the menu turns horizontal instead of staying vertical.

My website is not in English because I am Czech, so please forgive any mistakes I may have made.

Answer №1

It appears that in your code, you have set float:right for each <li> element.

To address this issue in the media query for 800px, simply add li{ float:none;}.

If the problem persists, also include display: inline; in the styling for the li elements.

Answer №2

At approximately line 177 of the styles.css file, you'll find the following code snippet:

nav ul li {
    display: inline;
    float: right;
}

These rules are responsible for making your menu appear horizontal. If we were to remove these rules, the menu would look like this: https://i.sstatic.net/gGt7e.png

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

What is the best way to make the contents of my table scroll while keeping the table structure fixed?

I am looking for a way to scroll the contents of my table horizontally while keeping the table structure fixed. Currently, when I try to scroll, the table structure scrolls along with the content, resulting in visibility issues at both ends due to the corn ...

switching the color of a path in an SVG when hovering over a

In the midst of working on SVG, I'm trying to implement a color change effect upon hover. The desired functionality is such that when hovering over the .business div, the color of the SVG business path should also change accordingly as specified in th ...

Using JavaScript to send an HTTP GET request with specific parameters

In MathJax, the script is included in this way. <script type="text/javascript" src="path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> Can you access the config parameter through JavaScript? ...

Is it possible to divide a column in an HTML table into two separate

I am currently working with an array of elements that I need to iterate over. For each element, I create a <td></td> tag. When dealing with 10 elements, it results in a table with one column and 10 rows. Is there a method, using either HTML o ...

Javascript alert: forgetting to add ; before statement causes SyntaxError

Seeking to incorporate a post-it application into my django website using Javascript/JQuery. Came across a tutorial and attempted to add it to my script, but encountered a SyntaxError: SyntaxError: missing ; before statement post-it.js:2:19 Not be ...

How can I properly choose distinct values for an individual attribute from a JavaScript array containing objects?

Let's imagine a scenario with an array of JavaScript objects like this: var data = [ {category : "root", type: "qqqqq", value1: "aaaaa", value2: "zzzzz"}, {category : "root", type: "qqqqq", value1: "aaaaa", value2: "xxxxx"}, {category : " ...

The onchange event is not activating

Hey there, I'm working on preventing users from selecting the same value in multiple select boxes. Unfortunately, my JavaScript event isn't functioning as expected. Here's a snippet of what I have: prioritize_change_handler.js $(function ...

Achieving Perfect Alignment in Dreamweaver: Crafting a Stylish Header Container

Hello, I am currently working on a Dreamweaver site and have created a CSS style sheet within my template that includes a div tag called #HeaderBox. My goal is to make this box 40% of the screen's size, with specific pixel dimensions if necessary. I a ...

The expanding main of the CSS dropdown menu continues to grow

After creating my first CSS drop-down menu, I encountered an issue that I need help with. When the submenu expands, it affects the main ul element by pulling it down, which is not the desired behavior. I want the main ul element to maintain its specified h ...

The bootstrap carousel is unable to load at the moment

I've been attempting to create a carousel using Bootstrap, but it's not displaying correctly in Firefox or Google Chrome on Windows 8. Here's the code I used, could someone please help me identify what I might have done incorrectly? <htm ...

Utilizing pseudo elements (after) in CSS with the font family in Font Awesome 6 fails to function properly

I am attempting to create the div using CSS after pseudo-element and I have included the Unicode in the content with the font family being "Font Awesome 6 Free". However, nothing is showing up and I'm not sure why. Can someone please assist me? Here i ...

What is the best way to store multiple selected items from a list in a variable

When I attempt to store my selected list in a variable, it always gives me an undefined value. function showUserChoices(a) { var b = console.log(a[a.selectedIndex].value); alert(b); } I am able to retrieve the value using console.log, but I want ...

Is it possible to make Plotly save plots in their original size?

I am currently using R for data analysis and visualization. I found a helpful tutorial that guided me to create the following plot: library(dplyr) library(plotly) data <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/gapminde ...

"Exploring the Power of jQuery for Interacting Across

Here is my AJAX code snippet: $.ajax({ type: 'GET', dataType: "jsonp", processData: false, crossDomain: true, jsonp: false, url: "http://someotherdomain.com/service.svc", success: function (responseData, textStatus, j ...

How can I prevent Sundays from being selected in a jQuery datetimepicker?

I'm currently working with a jquery datetimepicker and my goal is to exclude Sundays from the selection. How can I achieve this? Below is the jquery code that I am using: $(".datetimepicker").datetimepicker({ format: 'm-d-Y H:i', defaultD ...

The $.post() function encountered an error due to the restriction that prevents resources from a null origin from being

Here is a snippet of code I am working with: $(function(){ $.get("test.html", function(data){ $(".msgs").text(data) }) }) After running the above code, I encountered this error message in the console: XMLHttpRequest cannot load file:///C ...

Is it possible to leverage specific client-side Javascript APIs on the server-side?

Exploring APIs designed for web browsers that require their .js code to return audio streams. In a broader sense, these APIs provide byte streams (such as audio) for playback in the browser. Is it possible to use these APIs in server-side Javascript frame ...

Tips on moving down the `<li><span>` elements with the jQuery `.slidedown()` method

I'm struggling to articulate my question clearly, so please bear with me. Essentially, I have a jquery script that reveals content within a div nested in an li. When I click on the header, the content drops down and visually pushes the next header do ...

Tips for converting response text into HTML code

I am receiving a text response like this <span class='text-4xl'>description1</span> When I display it on the screen: import React,{useContext, useEffect} from 'react'; import blogsContext from '../context/blogsCon ...

Is there a way to load two jQuery instances simultaneously?

Our current CMS has restrictions and the jQuery code is placed in the footer of the page. The script below checks if jQuery is available, but since jQuery loads after this script, it always returns false causing our code to not run. if (typeof jQuery != ...