Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6782291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:43:26+00:00 2026-05-26T16:43:26+00:00

I reduced the font size of a superfish menu using this code .sf-menu a

  • 0

I reduced the font size of a superfish menu using this code

.sf-menu  a
{
    font-size: 15px;
    padding: 8px;
}

which also reduced the height of the menu items. When I hover on a menu item, the sub menu drops down (it is a horizontal menu), but there is a big gap between the main menu item and the submenu, and I am not able to click on any of the sub-items.

How do I reduce the height of the menu items (main and sub menus) but keep the rest of the functionality as is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:43:27+00:00Added an answer on May 26, 2026 at 4:43 pm

    To reduce or change the font-size of the menu-items, you indeed specify it in the superfish css stylesheet, like this:

    .sf-menu a {
        font-size: 15px;
        padding: 8px; /* not nessesary to do this */
    }
    

    If you do change the font-size, then the submenu (childmenu) doesn’t position nice. Therefore you will need to change the position of the submenus, like this:

    1. Look in the stylesheet for “.sf-menu li:hover ul, .sf-menu li.sfHover ul”
    2. Change the value of the TOP attribute to the position that is suitable for you.

    Like this:

    .sf-menu li:hover ul, .sf-menu li.sfHover ul {
        left: 0;
        top: 2.3em;
        z-index: 99;
    }
    

    If you want to change the height of the menu-items, then you can change the padding attribute:

    .sf-menu a {
        font-size: 15px;
        padding: 16px 8px;
    }
    

    OR, you can use a height attribute like this:

    .sf-menu a {
        font-size: 15px;
        padding: 8px;
        height: 30px /* for example */
        line-height: 30px /* You should include this line-height attribute to align the text in the middle of the box, the value is equal to the value of height attr. */
    }
    

    In this case, also don’t forget to change the TOP attribute of the submenu (“.sf-menu li:hover ul, .sf-menu li.sfHover ul”) as explained above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot remove padding adjacent to a link in this page I have reduced
I have a cell with fixed height and I want the font size of
I'd like to reduce the default font size for a buffer using Emacs lisp.
I have the following form, which I have reduced as much as I can,
I am generating a simple form with php. The following code has been reduced
I am looking into creating type-safe generic controls. This is targeting the (reduced) generics
This CSS problem is killing me :-( I cannot remove padding under a link
Is it possible to reduce or change the font of the items of the
I need to reduce the font size of the table view header. My string
Is it possible to reduce the AlertDialog.Builder title font size and positive button size?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.