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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:38:12+00:00 2026-05-15T20:38:12+00:00

I have an area that is identified by a #id and there is a

  • 0

I have an area that is identified by a #id and there is a CSS like:

#id ul li {
    margin:0;
}

can I, for a specific UL in that area, override the margin-setting? I understand that #id creates very high priority in evaluating the formatting.

I have tried:

.myclass ul li {
    margin-left: 20px;
}

and

#id ul.myclass {

as well as

#id li.myclass {

Is it even possible?

  • 1 1 Answer
  • 3 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-15T20:38:12+00:00Added an answer on May 15, 2026 at 8:38 pm

    I agree with SWilk, avoid !important if possible (and it is possible here). Some other solutions that SWilk did not offer is:

    #id ul.myclass li {
    

    or…

    #id ul li.myclass {
    

    The key is increasing the specificity of the selector, which the above, and SWilk’s solutions do. The reason your original solutions did not work is that you did not include the other tag (ul or li) nor the #id with your addition of the .myclass.

    Added after your comment that showed structure:

    If your html is this (as you stated in your comment):

    <div id="ja-col2">
      <div>.... 
        <ul class="latestnews">
          <li class="latestnews">
    

    And your current css is (as stated in another comment):

    #ja-col1 ul li, 
      #ja-col2 ul li { 
        margin:0; padding-left:15px; 
      } 
    #ja-col2 .latestnews ul li, /*does not exist*/
      .latestnews #ja-col2 ul li, /*does not exist*/
      .latestnews ul li, /*does not exist*/
      ul.latestnews li.latestnews { 
         list-style:disc outside url("../images/bullet.gif"); 
         margin-left:15px; padding-left:15px; 
      } 
    ul li { line-height:180%; margin-left:30px; }
    

    The reason you are not seeing any change is because three of your selector paths do not exist in your html structure, and the one that wins by specificity is the very first group. You need:

    #ja-col2 ul.latestnews li
    

    To override the #ja-col2 ul li.

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

Sidebar

Related Questions

Does JQuery have the ability to create an area that scrolls? Like I have
I have a client apllication that run in very restricted area - it has
I have a plist that is set up like: As you can see, I
If I have a development area that I deleted files from a certain folder/directory,
I have an application that has an area that is supposed to behave somewhat
I have a container MovieClip that serves as a content area that I need
I have a text area in a form that has a character limit and
I have an effect that when you hover over this one particular area, it
I have a div (sub area of page with scroll bar) that has some
I have an alert box that is triggered when users mouseover a certain area.

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.