Close Menu
Waste MindsWaste Minds

    Subscribe to Updates

    Get the latest news from Waste Minds.

    Loading
    What's Hot

    Theatres vs Streaming: Is the Box Office Making a Comeback?

    April 25, 2025

    Highest Paying Job Oriented Computer Courses

    April 23, 2025

    Boost Your Rankings: Optimize Website Performance for Google

    April 8, 2025
    Facebook Instagram Telegram RSS
    Facebook Instagram Threads X (Twitter) Telegram RSS
    Waste MindsWaste Minds
    Subscribe
    • Home
    • Web, Design & Code
      1. Cheatsheet & Roadmap
      2. Coding
      3. WordPress
      4. Designing
      5. Digital Marketing
      6. View All

      Cheat Your Way to Productivity: Time Management Hacks and Techniques

      July 27, 2023

      What is SQL & SQL Cheatsheet

      June 19, 2022

      Effortless WordPress Migration Guide

      March 18, 2025

      [Fixed] WordPress – Elementor Schemes Manager Error – “Elementor\Core\Schemes\Manager”

      February 1, 2025

      No-Code vs Low-Code: Which Is Best for Modern Websites?

      November 18, 2024

      Add /blog/ to WordPress Blog Permalinks Easily

      October 30, 2024

      Effortless WordPress Migration Guide

      March 18, 2025

      [Fixed] WordPress – Elementor Schemes Manager Error – “Elementor\Core\Schemes\Manager”

      February 1, 2025

      Add /blog/ to WordPress Blog Permalinks Easily

      October 30, 2024

      Optimize WordPress Sub-Menus as 2 Columns Easily using CSS

      October 7, 2024

      Principles of Design: Understanding the Fundamentals of Visual Design

      March 7, 2023

      Breaking Down the Design Process: From Idea to Execution

      March 1, 2023

      Designing for user experience: Tips and best practices

      February 26, 2023

      Build a Strong Brand Identity for Success

      October 26, 2024

      Digital Marketing in the Metaverse: Key Strategies

      October 9, 2024

      How to Use Schema Markup for Better SEO Results

      September 3, 2024

      Digital Marketing Strategies 2024: Expert Insights and Predictions

      January 18, 2024

      Boost Your Rankings: Optimize Website Performance for Google

      April 8, 2025

      Effortless WordPress Migration Guide

      March 18, 2025

      [Fixed] WordPress – Elementor Schemes Manager Error – “Elementor\Core\Schemes\Manager”

      February 1, 2025

      No-Code vs Low-Code: Which Is Best for Modern Websites?

      November 18, 2024
    • Interview Q&A
      1. Books & Entertainment
      2. Make Money
      3. View All

      Theatres vs Streaming: Is the Box Office Making a Comeback?

      April 25, 2025

      Top Best Books to Master CSS

      May 14, 2022

      Best Websites to Watch Cartoons for Free

      August 27, 2021

      Start Your E-Commerce Store with No Inventory

      March 5, 2025

      AI Tools for Blog Income

      September 7, 2024

      Unlocking Niche E-commerce: Profitable Strategies & Markets

      March 29, 2024

      [Guide] Online Course Success Strategies: Building Your Empire

      January 20, 2024

      Highest Paying Job Oriented Computer Courses

      April 23, 2025

      Nurturing Workplace Mental Health: Strategies and Employee Narratives

      January 22, 2024

      Mastering the Interview Follow-Up: Stand Out After Interview

      August 11, 2023

      Virtual Interviews: Mastering Remote Hiring 2023

      August 7, 2023
    • Lifestyle
    • Others
    • Project Ideas
    • Reviews
    • Tech Updates
      1. Extensions
      2. View All

      Top Chrome extensions for productivity and efficiency – Part 1

      February 26, 2023

      HTTP and HTTPS, TLS Types & SSL Installation Guide

      December 7, 2024

      Top AI Tools: Essential Technologies for Every Industry

      September 9, 2024

      Top AI Tools for Startups to Boost Growth

      September 8, 2024

      Adobe MAX Innovations: Project Stardust, See-Through, Primrose – Part 1

      October 30, 2023
    • Contact
    Waste MindsWaste Minds
    Home » Optimize WordPress Sub-Menus as 2 Columns Easily using CSS
    Coding No Comments

    Optimize WordPress Sub-Menus as 2 Columns Easily using CSS

    Vijay KarthikBy Vijay KarthikOctober 7, 2024Updated:October 9, 20245 Mins Read26 Views
    Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit VKontakte Telegram WhatsApp Copy Link
    [CSS] Easily Optimize WordPress Sub-Menus as 2 Columns Featured Image
    Share
    Email Copy Link Facebook Twitter WhatsApp LinkedIn Telegram Pinterest

    In today’s rapidly evolving digital landscape, optimizing your WordPress menus for desktop users with sub-menus as 2 columns is essential, while also providing a smooth experience for mobile visitors. This guide will specifically cover how to implement this layout for desktop users, ensuring that navigation remains intuitive and organized. We’ll also explore how to add CSS classes in WordPress menus to give you greater control over their styling.

    Contents hide
    1 The Importance of Menu Design
    1.1 Why Multi-Column Menus?
    1.2 The Responsive Design Challenge
    2 Creating a Desktop-Friendly WordPress Sub-Menus as 2 Columns
    2.1 Setting Up Your Menu
    2.2 Adding CSS Classes to Menu Items
    2.3 Implementing CSS for Sub-Menus as 2 Columns (Multi-Column)
    2.4 Breaking Down the CSS
    3 The User Experience on Smaller Devices
    3.1 Simplifying for Mobile
    3.2 Benefits of a Clean Mobile Menu
    4 Testing Your Menu Design
    4.1 Importance of Cross-Device Testing
    4.2 Using Developer Tools
    5 Advanced Styling Techniques for WordPress Menus
    5.1 Adding Hover Effects
    6 SEO Considerations for WordPress Menus/Sub-Menus as 2 Columns
    6.1 Structuring Menus for SEO
    6.2 Utilizing Breadcrumbs
    7 Conclusion

    The Importance of Menu Design

    Why Multi-Column Menus?

    Multi-column sub-menus or sub-menus as 2 columns enhance navigation on larger screens. With more space available, these menus can display options side by side, making it easier for users to find what they’re looking for. However, applying this design to smaller screens can clutter the interface, detracting from the user experience. Therefore, it’s essential to implement responsive design practices.

    The Responsive Design Challenge

    Creating a menu that works well on both desktop and mobile devices involves thoughtful design choices. The objective is to ensure that desktop users enjoy a rich experience while mobile users have access to a streamlined interface.

    Creating a Desktop-Friendly WordPress Sub-Menus as 2 Columns

    Setting Up Your Menu

    1. Go to Appearance > Menus in your WordPress dashboard.
    2. Select an existing menu or create a new one.
    3. Add your desired pages, categories, or custom links.
    4. Organize items into sub-menus by dragging them under main menu items.

    Adding CSS Classes to Menu Items

    To enhance the styling of your menu items, you can add custom CSS classes. Here’s how to do it:

    1. In the Menus section, ensure that the CSS Classes option is enabled:
      • Click on the Screen Options tab at the top right of the page.
      • Check the box next to CSS Classes.
    2. Now, when you expand a menu item, you will see a field labeled CSS Classes (optional).
    3. Enter a class name (e.g., sub-menu-columns) for any menu item that requires special styling.

    Implementing CSS for Sub-Menus as 2 Columns (Multi-Column)

    Now that your menu is set up and custom classes are assigned, add the following CSS to your theme:

    1. Navigate to Appearance > Customize.
    2. Click on Additional CSS.
    3. Enter the following code:
    @media only screen and (min-width: 1024px) {
      .sub-menu-columns ul.sub-menu {
        column-count: 2;
        column-gap: 10px;
      }
    
      .sub-menu-columns .sub-menu li {
        max-width: 400px;
      }
    
      ul#menu-main-menu ul ul {
        right: unset;
        left: 100%;
      }
    }

    Breaking Down the CSS

    1. Media Query:
    @media only screen and (min-width: 1024px) {

    This targets devices with a width of 1024 pixels or more, suitable for desktops and laptops.

    1. Sub-Menus as 2 Columns (Multi-Column) Layout:
    .sub-menu-columns ul.sub-menu {
      column-count: 2;
      column-gap: 10px;
    }

    This sets the sub-menu to display in two columns, with a gap of 10 pixels between columns for improved readability.

    1. Maximum Width for Sub-Menu Items:
    .sub-menu-columns .sub-menu li {
      max-width: 400px;
    }

    This ensures each item in the sub-menu remains readable without becoming too wide.

    1. Positioning Sub-Menus:
    ul#menu-main-menu ul ul {
      right: unset;
      left: 100%;
    }

    This controls the positioning of nested sub-menus, ensuring they appear directly to the right of their parent item.

    [CSS] Easily Optimize WordPress Sub-Menus as 2 Columns

    The User Experience on Smaller Devices

    Simplifying for Mobile

    Without media queries, the multi-column design would apply to all devices, which could lead to a confusing experience on mobile. By restricting these styles to larger screens, mobile users will see a simpler, single-column layout that enhances navigation.

    Benefits of a Clean Mobile Menu

    A streamlined mobile menu improves user satisfaction by allowing quick access to information. Users can navigate without the clutter that often comes with multi-column designs.

    Testing Your Menu Design

    Importance of Cross-Device Testing

    After implementing your CSS changes, testing is vital to ensure everything works as intended across various devices.

    Using Developer Tools

    To check your design:

    1. Open your site in a web browser.
    2. Right-click on the page and select Inspect.
    3. Click the Toggle Device Toolbar icon (looks like a phone/tablet).
    4. Choose different device sizes to see how your menu adjusts.

    Make sure that the multi-column layout appears correctly on larger screens and a single-column layout is shown on mobile devices.

    Advanced Styling Techniques for WordPress Menus

    Adding Hover Effects

    Enhance user engagement with hover effects. For instance:

    .sub-menu li:hover {
      background-color: #f0f0f0;
      transition: background-color 0.3s ease;
    }

    Incorporating Icons

    Adding icons next to your menu items can enhance both aesthetics and usability. Consider using a plugin like Font Awesome to integrate icons that match your site’s branding.

    SEO Considerations for WordPress Menus/Sub-Menus as 2 Columns

    Structuring Menus for SEO

    A well-structured menu not only aids navigation but also plays a role in SEO. Ensure that your menu items are descriptive and keyword-rich to help search engines understand your content better.

    Utilizing Breadcrumbs

    Integrating breadcrumbs into your WordPress site can significantly improve navigation. Breadcrumbs provide a visual guide for users, allowing easy backtracking and enhancing the overall user experience.

    Conclusion

    Enhancing your WordPress menus for desktop users with sub-menus as 2 columns while ensuring a user-friendly experience for mobile visitors is crucial in contemporary web design. By leveraging CSS media queries and custom classes, you can create a responsive menu that significantly boosts user engagement across all devices.

    Adopting these techniques will not only improve usability but also positively impact your SEO efforts. By focusing on a seamless navigation experience, you ensure that every visitor can easily find what they need, leading to increased satisfaction and engagement. Implement these strategies to elevate your WordPress site and effectively serve a diverse audience.

    CSS for WordPress custom CSS desktop user experience menu customization mobile navigation mobile-friendly design multi-column menus navigation tips responsive design responsive menus SEO Best Practices site structure theme customization User Engagement user experience design Web Design Website Optimization website usability WordPress development WordPress menus
    Share. Email Copy Link Facebook Twitter WhatsApp Telegram Pinterest LinkedIn Tumblr Reddit
    Avatar of Vijay Karthik
    Vijay Karthik
    • Website
    • Facebook
    • X (Twitter)
    • Instagram

    Entrepreneur & CEO | Crafting Digital Experiences | Code Magician (Web Dev) | Online Marketing Maven | Business & Project Analyst.

    Related Posts

    Web, Design & Code 7 Mins Read49 Views

    Boost Your Rankings: Optimize Website Performance for Google

    By Vijay KarthikApril 8, 2025Updated:April 25, 2025
    Wordpress 6 Mins Read37 Views

    Effortless WordPress Migration Guide

    By Vijay KarthikMarch 18, 2025Updated:April 8, 2025
    Wordpress 4 Mins Read50 Views

    [Fixed] WordPress – Elementor Schemes Manager Error – “Elementor\Core\Schemes\Manager”

    By Vijay KarthikFebruary 1, 2025Updated:April 8, 2025
    Leave A Reply Cancel Reply

    Search
    Follow Us on Social
    • Facebook
    • Instagram
    • Threads
    • Twitter
    • Telegram

    Subscribe to Updates

    Get the latest news from Waste Minds.

    Loading
    Editors Picks

    Boost Your Rankings: Optimize Website Performance for Google

    April 8, 2025

    Breaking Down the Design Process: From Idea to Execution

    March 1, 2023

    Adobe MAX Innovations: Project Stardust, See-Through, Primrose – Part 1

    October 30, 2023

    HTTP and HTTPS, TLS Types & SSL Installation Guide

    December 7, 2024

    Facebook will now let you make group chats across Instagram and Messenger

    October 5, 2021
    Top Reviews
    93
    Reviews

    WP Rocket – WordPress Cache Plugin Review

    By Vijay Karthik
    93
    Reviews

    WP Engine Review

    By Vijay Karthik
    90
    Reviews

    Elementor Review: Unleashing the Power of Visual Website Building

    By Vijay Karthik
    Categories
    • Books & Entertainment (3)
    • Interview Q&A (7)
    • Lifestyle (24)
    • Make Money (10)
    • Others (2)
    • Project Ideas (6)
    • Reviews (11)
    • Tech Updates (20)
      • Extensions (1)
    • Web, Design & Code (42)
      • Cheatsheet & Roadmap (2)
      • Coding (18)
        • Wordpress (13)
      • Designing (3)
      • Digital Marketing (16)
    Archives
    • April 2025 (3)
    • March 2025 (2)
    • February 2025 (3)
    • December 2024 (2)
    • November 2024 (3)
    • October 2024 (8)
    • September 2024 (5)
    • August 2024 (1)
    • July 2024 (3)
    • June 2024 (1)
    • March 2024 (1)
    • January 2024 (4)
    • December 2023 (2)
    • November 2023 (3)
    • October 2023 (3)
    • August 2023 (12)
    • July 2023 (16)
    • March 2023 (3)
    • February 2023 (9)
    • January 2023 (1)
    • November 2022 (1)
    • October 2022 (1)
    • July 2022 (1)
    • June 2022 (6)
    • May 2022 (6)
    • April 2022 (2)
    • March 2022 (4)
    • October 2021 (3)
    • September 2021 (1)
    • August 2021 (1)
    • July 2021 (4)
    • March 2021 (1)
    • December 2020 (1)
    • November 2020 (1)
    • October 2020 (1)
    Advertisement
    Top Reviews
    8.2

    Screpy SEO Tool Review

    November 23, 2023
    8.6

    Reseller Club Hosting Review

    August 12, 2023
    9.3

    WP Engine Review

    August 4, 2023
    9.0

    Elementor Review: Unleashing the Power of Visual Website Building

    July 23, 2023
    8.8

    Contabo Hosting Review

    March 3, 2023
    Latest Post

    Theatres vs Streaming: Is the Box Office Making a Comeback?

    April 25, 2025

    Highest Paying Job Oriented Computer Courses

    April 23, 2025

    Boost Your Rankings: Optimize Website Performance for Google

    April 8, 2025

    Effortless WordPress Migration Guide

    March 18, 2025

    Start Your E-Commerce Store with No Inventory

    March 5, 2025

    Subscribe to Updates

    Get the latest news from Waste Minds.

    Loading
    Waste Minds
    Facebook Instagram Threads X (Twitter) Telegram RSS
    • Privacy Policy
    • Terms and Conditions
    Copyright © 2021-2025 - Waste Minds. All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.