Assign an identification number to a menu

I am currently working with Wordpress and I have encountered a conflict between my menu and the Wordpress admin bar. In order to resolve this issue, I need to give my menu a distinct identity. Despite trying various IDs and Classes in the CSS, I have been unable to find a solution. Do you have any suggestions or ideas that I can try?

<style>
    ul {
        text-align: left;
        display: inline;
        margin: 0;
        padding: 15px 4px 17px 0;
        list-style: none;
    }

    ul li {
        font: bold 12px/18px sans-serif;
        display: inline-block;
        margin-right: -4px;
        position: relative;
        padding: 7px 20px 10px 20px;
        background: #14325c;
        color: #fff;
        cursor: pointer;
        -webkit-transition: all 0.2s;
        -moz-transition: all 0.2s;
        -ms-transition: all 0.2s;
        -o-transition: all 0.2s;
        transition: all 0.2s;
    }

    ul li:hover {
        text-decoration: underline;
        background: #555;
        color: #fff;
    }

    ul li ul {  
        padding: 0;
        position: absolute;
        top: 35px;
        left: 0;
        width: 150px;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
        display: none;
        opacity: 0;
        visibility: hidden;
        -webkit-transiton: opacity 0.2s;
        -moz-transition: opacity 0.2s;
        -ms-transition: opacity 0.2s;
        -o-transition: opacity 0.2s;
        -transition: opacity 0.2s;
    }

    ul li ul li { 
        background: #555; 
        display: block; 
        color: #fff;
        text-shadow: 0 -1px 0 #000;
    }

    ul li ul li:hover { background: #666; }

    ul li:hover ul {
        display: block;
        opacity: 1;
        visibility: visible;
    }
</style>

<ul>
    <li>ADMISSIONS
        <ul>
            <li>Apply Now</li>
            <li>Programs of Study</li>
            <li>Registrar</li>
            <li>FYE Orientation</li>
        </ul>
    </li>
    <li>RESOURCES
        <ul>
            <li>Academics</li>
            <li>Student Services</li>
            <li>Student Life</li>
            <li>Career Services</li>
            <li>Business Office</li>
        </ul>
    </li>
    <li>FINANCIAL AID
        <ul>
            <li>My FAO</li>
            <li>Types of Financial Aid</li>
            <li>Scholarships</li>
            <li>Net Price Calculator</li>
            <li>Forms</li>
        </ul>
    </li>
    <li>CONTACT US
        <ul>
            <li>Schedule a Visit</li>
            <li>Request Information</li>
            <li>Locations</li>
            <li>Employee Directory</li>
        </ul>
    </li>
</ul>

Answer №1

Solved the puzzle.

By wrapping my html in a nav element with the id of nav-menu, and prefacing each css entry with #nav-menu, I successfully resolved the issue.

Everything is now functioning smoothly, compliments to @Terry!

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

CSS Navigation Bar Overflowing (taking up 100% of width, overflowing onto next line)

I'm struggling with my aspx master page, where the navigation bar is wrapping around even though I have set the width to 100%. It has worked fine in other projects, so I'm not sure what's causing this issue. Snippet: /*General Styling*/ ...

What is the exclusion filter in AngularJS?

I am currently working on implementing a search box with angular in my project: <input type="text" typeahead="item.name for item in list | filter: $viewValue:comparator | orderBy: '+name'"/> As part of this functionality, I am looking to ...

Adjusting the transparency levels of all div backgrounds simultaneously

Is there a way to uniformly add an alpha value to all the divs on my web page without specifying the exact color code in 'rgba'? I have divs with different background colors and I want to easily revert the changes if needed. Perhaps something al ...

Unable to locate element within the HTML code in Angular

Despite using document.getElementByID, I am unable to retrieve the value of the list element in the HTML. The code shows that the element is undefined, even though it has the same id. Here is the snippet of code: fileupload.component.ts: ngOnInit() { ...

What sets apart a .class element from element.class in CSS?

I was browsing through this tutorial http://www.w3schools.com/css/tryit.asp?filename=trycss_nesting and noticed a confusing point. Why did they use .marked p instead of p.marked? When I tried changing it to p.marked, the text didn't turn white as expe ...

Incorporating a stationary sidebar onto your website

My goal is to create a fixed side menu similar to the one on this website: Below is my HTML code: <!-- Scroll TEST --> <ul id="followTab"> <li> <a class="newsletter" href="newsletter/" title="Subscribe to ..."> ...

Having trouble getting Flask to apply a css stylesheet (problem with url_for())

I am currently working on integrating a CSS stylesheet with an HTML file using Flask by following some basic tutorials. Despite following the steps outlined in the tutorials, I am facing an issue where the stylesheet is not being applied to the HTML file. ...

Animating an element as the user scrolls down the page

I'm attempting to create a fading effect for a header on my website that should appear when the user scrolls past the initial section of the page. I currently have a div element with an opacity set to 0 and it transitions to an opacity of 1 as shown b ...

How to align the navbar toggle button and list items to the right in Bootstrap 5

I'm struggling with a simple html page that has a fixed navbar at the top. Everything looks great when viewed in full-screen mode, with centered links. However, when the page size is reduced, it collapses to a toggle button on the left side. What I re ...

What is the best way to create a unique shadow effect for a container in Flutter?

I am facing a challenge with my screen layout that uses GridView.builder with crossAxisCount: 3. In the itemBuilder, I am returning a Container with shadows on the left, right, and bottom, but so far, I have not been able to achieve the desired outcome. H ...

CSS: positioning and resizing image while maintaining aspect ratio

Is there a way to center and resize an image in html/css while maintaining its aspect ratio? I currently have a solution that centers the image, but it does not scale up when necessary. Here is the code snippet: http://jsfiddle.net/4Mvan/438/ .container ...

Experiencing difficulty in removing a row from an HTML table using jQuery DataTables

I have an HTML table populated with data from the database. My goal is to be able to delete a row from the HTML table without affecting the actual data in the database. Each row in the table has a delete button in the action column, and when clicked, tha ...

Is it possible to determine if a JavaScript/jQuery effect or plugin will function on iPhone and iPad without actually owning those devices?

Is there a way to ensure that a javascript/jquery effect or plugin that works well on all desktop browsers will also work on iPhone and iPad without actually owning those devices? Can I rely on testing it on the latest Safari for Windows to guarantee comp ...

A more efficient approach to creating a personalized design

After realizing the original question was unclear and wouldn't solve my problem, I have decided to edit it and create a new one. For my project, I require a customized layout where users can move, resize, add, or remove each box according to their pr ...

Leveraging CSS custom properties globally

I have set up PostCSS parser with the help of and am currently exploring options to create a variables.css file that will hold all my theme settings. At this point, my variable.css file appears as follows, containing a couple of variables: :root { --co ...

The element is unclickable due to being obstructed by another element

https://i.sstatic.net/pomMS.png My task is to click on a button using this code: browser.find_element_by_id('btnSearch') However, the button is being blocked by a div tag with the following attributes: <div id="actionSearch" class="row pull- ...

Is there a method in AngularJS to submit form data when the input fields are pre-populated using a GET request?

How do I submit form data in AngularJS? I have a div that populates the input field from a GET request. Now, I want to send this data using a POST method. How can I achieve this? Below is the form div: <div class="row" ng-app="myApp" ng-controller="myC ...

Having trouble with vendor CSS not being recognized during brunch compilation

I am currently exploring the use of Pure.css in my application. After installing it via npm, I have configured my brunch-config.js as follows: stylesheets: { joinTo: { 'app.css': /^app/, 'vendor.css': /^(?!app)/ } } At thi ...

"Continuously loading while waiting for Ajax to finish loading

I have added a div to my index.php file in WordPress. I am trying to send a number to page.php using jQuery and then display the result on index.php using AJAX. I would like to show a loading indicator (text or image) in the div until the AJAX request is ...

Tips for creating random CSS values for an element generated with javascript?

Apologies for the blunt title, but I couldn't find a more precise way to phrase it. I recently stumbled upon this fantastic slider tutorial. Before implementing it on my own page, I would like to customize it by replacing the small circles at the bott ...