Adjusting Font Size of Menu BarORModifying

I'm currently using WordPress to build my website.

If you'd like to take a look, here is the link:

I'm trying to make the font size smaller to accommodate more menu bars on the site. Any suggestions on how I can achieve this would be greatly appreciated!

I've already attempted modifying the CSS code, but haven't had much success so far. It's possible that I'm doing it wrong.

Here's an example of what I've added:

font-size: 0.75em;

I've applied this to all the menu CSS sections I could find, yet I'm still facing issues.


/* Pagenavi  */

#pnavigation {
    margin: 20px 0px;
}

.wp-pagenavi {
    font-size:0.75em;
    text-align: centre !important;
    margin-left: auto;
    margin-right: auto;
}

.wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi a:visited {
    text-decoration: none;
    background: #42444e!important;
    border: 1px solid #212227!important;
    color: #fff !important;
    padding: 4px 8px !important;
    display: block;
    text-align: centre;
    float: centre;
    display: inline;
    margin-right: 6px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    font-size:0.75em;
}

.wp-pagenavi a:hover {
    color: #ffffff;
}

.wp-pagenavi span.pages {
    display: none;
}

.wp-pagenavi span.current {
    text-decoration: none;
    background: #CF5912 !important;
    border: 1px solid #993206!important;
    color: #fff !important;
    padding: 4px 8px !important;
    display: block;
    text-align: center;
    float: centre;
    display: inline;
    margin-right: 6px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    font-size:0.75em;
}

.wp-pagenavi span.extend {
    text-decoration: none;
    background: #FFD000 !important;
    border: 1px solid #E8B900 !important;
    color: #fff !important;
    padding: 4px 8px !important;
    display: block;
    text-align: center;
    float: centre;
    display: inline;
    margin-right: 6px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    font-size:0.75em;
}

Answer №1

Consider adjusting the font-size. You have the flexibility to modify it either in the #botmenu section or in the #submenu area.

#botmenu {
    font-size: 90%; /* Decrease the percentage for smaller text size */
}

OR

#submenu {
    font-size: 90%; /* Decrease the percentage for smaller text size */
}

Answer №2

When the code

#submenu li a {font-size: .75em;}
fails to work, you can attempt to include it in this way.

submenu li a {
     font-size: .75em !Important;
}

Answer №3

An alternative option is to utilize font-size: 100%. This percentage value is passed down from the parent element, providing the flexibility to adjust it to 75% or 85%. I suggest experimenting with this feature in the developer tools for optimal results.

Best regards

Answer №4

While some may have differing opinions, I personally choose to create a new CSS class with the !important declaration, like so:

.wp-mbfontupdate {0.75em !important}

After that, I simply add the wp-mbfontupdate class to my menubar's existing class. This allows me to easily locate and update the font style in the future.

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

Skipping is a common issue encountered when utilizing Bootstrap's Affix feature

I'm trying to implement Bootstraps Affix feature in a sticky subnav. <div class="container" data-spy="affix" data-offset-top="417" id="subnav"> I've adjusted the offset to ensure there's no "skip" or "jump" when the subnav sticks. Ho ...

One common issue is being unable to target input[type=file] when multiple forms are present on a page using JavaScript

Question: I have multiple dynamic forms on a web page, each with a file input field. How can I specifically target the correct file input using $(this) in JavaScript? Here is an example of one of my forms: <form enctype="multipart/form-data" action="c ...

What is the formula for determining the REAL innerWidth and innerHeight?

I am currently working on a responsive website using Bootstrap and I am looking to create an element that perfectly fits the screen size. When I set the height/width to 100%, the browser includes the toolbar, other tabs, and the Windows taskbar in the cal ...

Query sub-field repeater dates in Wordpress ACF

Searching for specific custom posts in a WordPress site can be challenging, especially when dealing with custom fields like course_code and course_iteration. The course_iteration field, in particular, contains sub-fields such as course_iteration_start and ...

The positioning of the <thead> element does not seem to be functioning properly

I attempted to create a background for the header (thead) using a pseudo element (:after) because I wanted the background to span from one edge to another edge (including both left and right side padding). However, thead is not taking a relative position a ...

The Media Query Menu is not aligned in the center for smaller screens, functioning in both medium and extra-small sizes

@import url('https://fonts.googleapis.com/css?family=Dosis'); * { box-sizing: border-box; } /*Xtra Small */ body { font-family: 'Dosis', sans-serif; line-height: 1.618em; font-size: 18px; background: #383231; c ...

What is the proper way to utilize the script type "text/x-template" in a multilanguage context?

I'm currently working with ASP NET and VueJS. In my ASP NET, I have a view component that looks like this: <script type="text/x-template" id="form-template"> @if (string.IsNullOrEmpty(Model.LastName)) { <in ...

Nav Dropdown Beyond Container Bounds

I'm working on implementing a flexbox navigation menu with dropdowns for certain items. However, I've encountered an issue where the dropdown lists are appearing to the right of the container on hover, rather than below it as expected for a typic ...

How can I ensure that my image remains responsive and aspect ratio-friendly?

Is there a way to accomplish this magical effect? I find myself in a similar situation. I require an image that remains centered while adjusting to fit the screen, all while maintaining its aspect ratio. ...

How do I align the output of a <script> using CSS?

I'm facing some issues trying to center an external script on my webpage. It involves a Google widget using Google Maps to provide directions to our office. Below is the code snippet I am working with: <asp:Content ID="Content1" ContentPlaceHolder ...

Discover the method for obtaining a selected element in a bootstrap dropdown that is dynamically populated

Similar to the question asked on Stack Overflow about how to display the selected item in a Bootstrap button dropdown title, the difference here is that the dropdown list is populated through an ajax response. The issue arises when trying to handle click ...

Creating Interactive Graphs with HTML and JavaScript: A Guide to Dynamic Graph Drawing

I am seeking to create a dynamic graph using standard HTML, JavaScript, and jQuery (excluding HTML5). The nodes will be represented by divs with specific contents, connected by lines such as horizontal and vertical. The ability to add and remove nodes dyn ...

What is the best way to set the width of a w2grid to 100%

Has anyone tried using w2grid before? I'm having trouble figuring out how to make it fill its container 100%. Here's the HTML snippet: <div id="a" style="width:100%"> <!-- top left container--> <div>This ...

Utilizing the power of JQuery AJAX and PHP to retrieve information from a MySQL database

Currently, I am facing an issue where my PHP code in the api.php file (under Joomla) is not returning the expected data. Below is the snippet of the code: <?php require_once( 'includes/defines.php' ); require_once( 'includes/framework.ph ...

Tips for Enhancing Field Integration in Third Party API Data Extraction

Currently, I am integrating the Church Community Builder API (official docs can be found here, search for "group profile" to find relevant code) while utilizing the CCB Core WordPress Plugin from GitHub. The goal is to synchronize groups data from the API ...

Exploring Angular 7: Understanding the HTML5 Fullscreen API and Overcoming Errors

I am currently using Angular 7 and I am trying to implement a fullscreen button in my app. I have utilized the HTML5 Fullscreen API and created two functions for this purpose: openfullscreen() { // Trigger fullscreen console.log('gg'); ...

Is it still beneficial to incorporate image sprites in the design of a mobile web app?

As I work on developing a mobile web app, I find myself debating whether to use individual images or stick with image sprites similar to what I do for my desktop site. My main concern is the potential increase in file size from consolidating all the images ...

Troubleshooting problems with encoding in Python Selenium's get_attribute method

Currently, I am utilizing Selenium with Python to crawl the drop-down menu of this particular page. By employing the find_elements_by_css_selector function, I have successfully obtained all the data from the second drop-down menu. However, when attempting ...

How jQuery stops the submission of a form

Sample HTML Code <p><select name="status" class="form-control" id="showThisItem"> <option value=""> Select Status </option> <option value="Paid"> Paid </option> <option value="Unpa ...

Remove the boundaries from the grid and only retain the box

I am not skilled in css, but I simply want to eliminate the interior edges of the box and retain only the outer edges. .grid-container { display: grid; grid-template-columns: auto auto auto; background-color: #2196F3; padding: 10px; } .grid-ite ...