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 8473823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:27:31+00:00 2026-06-10T17:27:31+00:00

I applied border style to my main menu li. but my sub menu li

  • 0

I applied border style to my main menu li.
but my sub menu li also affected from the main menu li style.
here is the sample code please let me know how i can fix this.

ul.menu li {
        border-left:1px solid #fcfcfc;
        border-right:1px solid #e8e8e8;
    }

above style also rendering on my sub menu li.
i don’t want to use class or id i want direct style to tag.
is there any way how i can stop rendering border on my sub menu.

    ul.menu ul li {
         min-width: 200px;

    }
  • 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-06-10T17:27:33+00:00Added an answer on June 10, 2026 at 5:27 pm

    If you only want to affect the direct children of the <ul> with class menu, you need to use this selector:

    ul.menu > li {
        ...
    }
    

    So if you have this structure:

    <ul class="menu">
        <li>One</li>
        <li>Two
            <ul>
                <li>Three</li>
            </ul>
        </li>
    </ul>
    

    Then this will style the <li> elements with contents One and Two, but not the submenu <li> with Three.

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

Sidebar

Related Questions

How do I parse the border width from style=border: solid 1px black; in jQuery/javascript?
I've got the following CSS code, but the -moz-border-radius and -webkit-border-radius styles aren't being
I have an asp.net gridview. i have applied a style to the main headings
I have this code. My problem is none of the style is getting applied
I have this code: <html> <head> <style type=text/css> .container { border-bottom: 1px dotted #999999;
I have a textarea with the following style applied: textarea { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; }
Suppose I have a div with the following styles applied: div { border: 1px
I have applied CSS border-bottom:1px dashed #494949; on several consecutive cells of a single
I have a floated an h2 a tag with a 6px border-top applied on
I have applied this code for iframe id. <iframe id='<?php echo 'fraDisabled'.$i.$post->ID; ?>' src='<?php

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.