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

  • Home
  • SEARCH
  • 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 7055081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:42:19+00:00 2026-05-28T03:42:19+00:00

I have an Html that contains something like: (Multiple divs within div A). <div

  • 0

I have an Html that contains something like:
(Multiple divs within div A).

<div class="a">
    <div class="b"></div>
</div>

My css looks like that:

.a div {
    border: solid;
    border-width: thin;
}

.b {
    border: none;
    border-width: 0px;
    border-collapse: collapse;
}

For some reason b’s values will not override a.
however, if i just write a rather than “a .div” i won’t get the behavior expected for the other divs inside a.

The only way i got this to work is using “important!” (ie “border: none!important”;) but that seems less than elegant.

would love any ideas as to what is going on there..

Ehud.

  • 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-28T03:42:19+00:00Added an answer on May 28, 2026 at 3:42 am

    .a div has a higher specificity than .b.
    If you want the css for .b to override the .a one, give it a higher specificity still, for instance .a div.b.

    (Or you can use !important, yes, but that is not recommended here.)

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

Sidebar

Related Questions

i am using JSOUP and I have html/text something like: <html><head><style type=text/css> </style></head> <body><div
I have something like: string result = Selenium.GetText(/html/body/form/div[2]); if (result.Contains(test) { bool found =
I have a model that looks something like this: public class SampleModel { public
I have a base.html template that contains a list of links. Example: <div id=sidebar1>
I have a block-level HTML element that contains multiple block-level and inline-level elements, e.g.
We have some html that looks like this: <form id=MyUserControl runat=server method=post> <script language=javascript
I have some html that looks like this: <dl> <dt>Label 1</dt> <dd> Yadda yadda
I have an HTML textbox that contains some SQL code that I need executed.
I have a html file that contains urls that start with ftps, http, https,
I have an ASP.NET MVC Partial View that contains a Html.TextBox that is configured

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.