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

Implementing checkboxes for each API data in JavaScript

I am fairly new to this and I am currently working on a to-do list. I want to include a checkbox next to each item from the API to indicate whether it has been completed or not. <script type="text/javascript"> fetch('http://localhos ...

Can a specific input value be applied or utilized in any way?

I have limited coding experience, so please forgive me if this is a simple question. I am curious if it is possible to create a feature on a website where user input is utilized elsewhere. Specifically, I am looking to have an input box where a user enter ...

Arrange two divs next to each other on the page: the div on the right can be scrolled through, while the div on the

I am attempting to create a layout similar to this https://i.sstatic.net/Y1FCp.png My goal is to: Have two main divs positioned side by side inside a wrapper div Ensure the wrapper expands to fill 100% of the browser size The left div (banner) should b ...

Chrome (on both Linux and Windows) is not compatible with CSS

Here is the code snippet I am currently working with: <style type="text/css"> div { margin: 100px auto; width: 0px; height: 0px; border-right: 30px solid transparent; border-top: 30px solid red; border-left: 30px solid red; border-bottom: 3 ...

Why is a div nested inside an overflow: hidden; div not expanding to the full width of its content?

.container { white-space: nowrap; overflow: hidden; } .inner { width: 100%; } .list-item { display: 'inline-block', boxSizing: 'border-box', border: '3px solid black' } import React, { Component } from 're ...

Encountering a ModuleBuildError while setting up Tailwind CSS in Laravel 8

I am currently learning Laravel version 8 and encountered an issue while trying to install Tailwind CSS using the npm command. npm install tailwindcss@npm:@tailwindcss/postcss7-compat @tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9 Here is a detai ...

Tips for updating the font color of BarMenu in Blazorise

I am struggling to change the default font color of the bar menu to red in a razor page. Despite trying the code below, it doesn't seem to work: <Bar Breakpoint="Breakpoint.Desktop" Background="Background.Light" ThemeContr ...

Zoom in to see the header spanning the entire width of the page

http://jsfiddle.net/CPSKa/ Whenever I zoom in on the header of my website, the line underneath it starts to shrink. Is there a way to prevent this from happening? Here is the HTML Code: <div id="main_header"> <div id="main_header_wrapper"&g ...

Adjust the dropdown width on a bootstrap form to match the size of the textbox

In order to maintain a combined width of 450px, I have two textboxes. One textbox includes a dropdown menu while the other does not. Both textboxes are part of an input group. The dropdown can switch between either textbox at any time. I need the width ...

How can I retrieve the reference number of an item by clicking a button within a list item in an unordered

Presented here is a collection of data points and a button nested within an ul <ul> <li class="mix" category-1="" data-value="600.35" style="display:block;"> <figure> <figcaption> <h3> ...

Selecting radio buttons across multiple div classes

I've been struggling to programmatically select specific radio buttons on a webpage. My goal is to automatically choose the second option in each group of radio buttons, but I'm getting lost in the syntax. Unlike most examples I've found on ...

Simultaneous Activation of Hover Effects on Multiple Elements

I have an array of objects that I'm iterating over. Here is the array: const socialLinks = [ { id: 1, child: ( <> <FaLinkedin className='text-2xl' /> Linkedin </> ), hre ...

Guidance on Configuring Django Static Files

For setting up my Django static files, I added the following code to settings.py: STATIC_URL = '/static/' STATIC_DIRS = [ os.path.join(BASE_DIR, 'static') ] STATIC_ROOT = os.path.join(BASE_DIR, 'assets') To implement this ...

Error: The function jQuery(...).hexColorPicker does not exist

I am attempting to utilize a color-picker jQuery plugin. Below is a screenshot of the JavaScript file: https://i.stack.imgur.com/ovRjx.png Here is the code I am using to initialize it: <script type="text/javascript> jQuery(function(){ ...

Building unique CSS classes with Material UI v5 theme - A step-by-step guide

Incorporating Material UI v5 into my application has been a smooth process, except when it comes to using react-d3-tree for rendering SVG tree charts. This library allows for custom CSS class names to be added to the <path> elements that connect the ...

Ways to exit the current browser window?

Is there a way to close the current browser window using JavaScript or another language that supports this functionality? I've tried using the window.close() function, but it seems to only work for windows opened with window.open(). Thank you in adv ...

Media queries in CSS not functioning as intended

Trying to scale media requests with an image (logo) for various mobile devices like iPhone 5, 6, 6+, iPads, and large screens. Need to specify styles for portrait and landscape orientation as well. The code seems to be functioning only for iPhone 6, iPads ...

Is there a way to incorporate CSS or tables when converting HTML to PDF using JavaScript?

While working on a project, I successfully converted an HTML file into a PDF. However, the output did not display the CSS design. Can anyone provide suggestions on how to include CSS design in the PDF file? Below is the JavaScript function code: $(funct ...

What specific CSS selector should be targeted in order to modify the appearance of this button?

I'm attempting to alter the appearance of a button within my Wordpress site, but I've hit a roadblock in identifying the correct element to modify. So far, I've tried targeting: .input#chained-quiz-action-1, however, the button stubbornly re ...

Implementation of multiple angular guards causing a crash on the page

I have been attempting to implement separate guards for distinct pages. Essentially, I am checking a boolean parameter to determine if a user is logged in or not. Below are the two guard.ts codes that I am using: export class IsAuthenticatedGuard implemen ...