Author Topic: Solution - How to force the category names to stay on one line in the drop menus  (Read 3506 times)

Offline OneMore

  • Newbie
  • *
  • Posts: 46
  • Karma: +13/-0
    • View Profile
To avoid carriage returns for long category names in the drop menus, simply add this CSS rule to the
"storefront/view/default/stylesheet/style.css" stylesheet:

Code: [Select]
section#categorymenu div.subcategories ul li a {white-space:nowrap;}
Tested for AbanteCart 1.2.11.
I inserted the text at line 226, just before the ".container-fixed {" selector.

Offline backcurrant

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • slope
Good information!

Offline plonkarchivist

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • doodle baseball
Thanks for this great in4

Offline mandmlogicosol

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • MandM Logico Solutions
To force category names to stay on one line in drop-down menus, you can use CSS to prevent text wrapping. Here’s a quick solution:
.dropdown-menu li a {
    white-space: nowrap;
}
This CSS rule applies the nowrap property to the anchor tags within the dropdown menu, ensuring that the text stays on a single line. If the text is too long, it will overflow horizontally, so you may also want to set a max width and enable text truncation:
.dropdown-menu li a {
    white-space: nowrap;
    max-width: 200px; /* Adjust as necessary */
    overflow: hidden;
    text-overflow: ellipsis;
}

Welcome to M and M Logico Solutions, where we provide airport transportation with a commitment to reliability, comfort, and style. As one of best Airport Transportation Services in USA, we take pride in offering a different fleet of vehicles to meet your specific needs. At M and M Logico Solutions, we understand that airport travel should be smooth and tension free for the clients of the USA. Our comprehensive range of airport shuttle services is

Offline promovers

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
  • The Pro Movers
    • View Profile
    • ProMovers
To force category names to stay on one line in drop-down menus, you can adjust the CSS of your website. Typically, you'll want to set a white-space property to nowrap in the CSS for the menu items, preventing the text from wrapping onto a second line. You may also need to adjust the width or padding of the drop-down menu to ensure there's enough space for longer category names. Here's an example CSS snippet:

.dropdown-menu li a {
    white-space: nowrap;
}
This will ensure the category names remain on a single line in your menu.
Excellent Quality Movers NYC and Expert Moving Packing Services: The ProMovers
Discover the top-rated quality movers in NYC at The ProMovers. Our expert team provides premium moving and packing services, ensuring a stress-free relocation experience. Get a free quote today!

 

Powered by SMFPacks Social Login Mod