Tips for Choosing Certain List Items in a Responsive Bootstrap Navigation Menu for WordPress

I've put together a sleek bootstrap navbar menu for WordPress. If you want to check out the menu design, you can view it by clicking on this link: here

There are still some tweaks that need to be made though. Specifically, I need to add a box around the top "Special Promotions" and "Board Certified" tabs to make them stand out more. To see what I'm talking about, visit this link: here

Here's the HTML code:

<!-- Menu's Code for Twitter Bootstrap -->
<div class="navbar navbar-inverse container mainmenu" role="navigation">
<div class="navbar-header">
    <button type="button" class="navbar-toggle" data-toggle="collapse"   data-target=".navbar-collapse">
        <span class="sr-only">Toggle Naavigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
    </button>
    <a class="navbar-brand" href="" >Navigation</a>
</div>
<div class="navbar-collapse collapse">
    <?php

    $args = array(
            'theme_location' => 'top-bar',
            'depth'          => 2,
            'container'      => false,
            'menu_class'     => 'nav navbar-nav',
            'walker'         => new Bootstrap_Walker_Nav_Menu()
    );
    wp_nav_menu($args);

    ?>
 </div>
 </div>
 <!-- Menu's Code for Twitter Bootstrap -->

Check out the CSS code below:

.mainmenu {background:#F2F0F1;border:none;margin-top:10px;margin-bottom:10px;}
.navbar-inverse .navbar-brand {color: #101010;}
.navbar-inverse .navbar-brand:hover {color: #101010;}
.navbar-inverse .navbar-toggle {border-color: #333333;background:#333333;}
.navbar-collapse {padding-right: 0px;padding-left: 0px;}
.navbar-brand {display:none;}
.mainmenu ul.navbar-nav {margin-left: -10px;}
.mainmenu ul.navbar-nav li {margin-top: 12px;margin-left: 10px;}
.mainmenu ul.navbar-nav li a {color:#101010;padding: 5px 2px;font-family: 'Open Sans', sans-serif;font-size:18px;}
.mainmenu ul.navbar-nav li a:hover {color:#fff;background:#13B4E3;}

To activate the Bootstrap navbar menu for WordPress, I use the following code in functions.php: http: // pastebin dot com/S0UCDUYi.

If anyone can help me with fixing these issues, I would greatly appreciate it. Thank you!

Answer №1

If you want to customize the styling of specific menu items on your Wordpress website, follow these steps:

  • First, navigate to the Wordpress | Appearance | Menus page
  • Ensure you can view CSS classes by following these steps:
    • Go to the menu editing page
    • Click on Screen Options located at the top right of the screen
    • Under 'Show advanced menu properties', check the box for 'CSS Classes'
  • Now, in the menu entries for the “Special Promotions” and “Board Certified” pages, add a new class like 'highlight'
  • Next, include the CSS for the new class:
.highlight { background: blue ... }

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

Preview of Hoverbox Caption

I'm working on a website using the Hoverbox image gallery (http://host.sonspring.com/hoverbox/) and I'm trying to include captions for each image preview that appears when hovering over the enlarged image. However, I am facing difficulty as I hav ...

Displaying the Polymer Paper spinner when the page is still loading

How can I make the polymer paper spinner display while the body tag is set to unresolved? I'm experiencing a brief blank screen before the page finishes loading. I'm feeling lost and unsure of how to begin. Check out the Polymer Project documen ...

When implementing Ajax with a Spring controller, it will redirect the user to a different location

I am currently working on developing a Spring MVC application similar to a "Cinema" app. I have implemented a RestController with a Get method that produces JSON responses. private SessionService sessionService; public SessionController(SessionService ses ...

I’m currently working on my webpage, utilizing HTML, CSS, and Bootstrap 4. I’ve encountered an issue where a slide keeps appearing at the bottom, but I’m

Improving HTML and Bootstrap: // Extra small devices (portrait phones, less than 576px) // No media query since this is the default in Bootstrap // Small devices (landscape phones, 576px and up) @media (min-width: 576px) { ... } // Medium devices ( ...

Using JSON as HTML data within Flexbox for interactive hyperlink rollovers

Utilizing JSON to extract HTML data with unique html tags within Flex has presented a challenge. The limited support for HTML in Flex has made it difficult to implement a basic font color rollover effect on links. While Flex only allows for a few HTML tags ...

This React.Js application hosted on Heroku is optimized for use on Chrome Desktop browsers

Just finished completing a React project that retrieves News Articles and presents them. Recently launched it on Heroku, but I'm encountering an issue where only Chrome on Desktop seems to be able to run it. Both Safari and Firefox are showing the sa ...

Issues with cascading style sheet navigation designs

Working on this project is new to me and I am encountering a challenge with two issues. My goal is to create a menu display similar to the image shown here: The problem lies in my inability to underline the selected option and make the menu display horiz ...

Tips for iterating through JSON Data:

Struggling with looping through JSON data retrieved from an ashx page to add values to li's in a ul. How can I effectively loop through and extract the values from the following JSON data? The format of the returned data looks like this: {"ImageCol ...

Breaking Free from Bootstrap Grids

I have a row with two Bootstrap columns - one wide and tall, the other short and narrow https://i.sstatic.net/u7WAf.png However, for mobile devices (targeted below lg), I want to change the column order to split into three sections Photo Consent Organis ...

What is the best way to execute two asynchronous calls sequentially in JavaScript?

When using a common generic function for AJAX calls, the initial request retrieves all data from the server and maintains it within local scope. However, subsequent requests are still hitting the server, even when the data is already available locally. Thi ...

Highlighting table rows when hovering in IE with JQuery - compatibility across all versions

I have a table on my jsp page with multiple rows and columns. I want to ensure that visitors can easily follow along when they interact with the table - by highlighting the row or column they hover over with a different background color. Although the **hov ...

Newbie Query: How can I apply various font weights to a single font within the same stylesheet?

Twice I have inserted the font Acumin Pro Condensed, once with a weight of 400 and again with a weight of 700. I attempted to use both weights separately; assigning the 400 weight to an h3 tag and the 700 weight to an h2 tag. However, only the 700 font we ...

Using recursive setTimeout in Javascript may not always utilize the entire final JSON object that is returned

My current approach involves making recursive calls to a URL until it returns either a success or reaches the maximum limit of tries. Below is a compact version of the relevant code: function doSomething(numRetries) { $.post('someURL', {retr ...

When Chrome DevTools are opened, some elements of a webpage undergo a transformation in their style

I've recently started working on a static webpage using VueJS/NuxtJS and Buefy as the UI library, although I am still learning about these technologies. One issue that I have encountered is that certain elements on the page change style when I open C ...

Is there a way to display a vertical list in a horizontal orientation?

I am in the process of creating my portfolio on Cargo Collective and have customized one of their pre-made themes to suit my preferences. The only thing I'm currently struggling with is how to change a set of vertical links to display horizontally ins ...

Using the CSS property `transform:scale(2,2)` causes an image to suddenly appear in the

Currently utilizing Joomla 3.3, I am seeking to enlarge an image on mouseover. The html code for the image is as follows: <img class="enlarge" style="float: right; margin: 10px; border: 5px solid black;" title="Chapter 1: Physical Differences" src="im ...

Curvature Factor equals Overflow of Color

After trying various solutions like "background-clip: padding-box;" to address the issue of background color bleeding outside of the border, I'm still not completely satisfied with the result. Is there a more effective fix for this problem? Check out ...

Attempting to open and display the contents of a text file (.txt) within a modal dialog box upon clicking a button

I am attempting to develop a modal that will appear when the user clicks on a specific button. The goal is for this modal to showcase text retrieved from a separate file stored on the server. My aim is to show this text within a dialog box modal. So far, ...

Guide: Enhancing Query Context within jQuery Instances Spanning Across Iframes

In my current project, I am facing a challenge with using a jQuery instance across iframes. It's been causing me quite a bit of frustration. Here's the situation: I have an existing web application that loads jQuery (which is aliased as $jq) in ...

Embed the content within an iframe element

Is it possible to insert content within an iframe tag like this? <iframe> <p>Hello World</p> </iframe> I attempted to do so, but the text "Hello World" did not display. Any help would be much appreciated. ...