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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:10:59+00:00 2026-05-31T02:10:59+00:00

This is how the code looks: And I want to a border for the

  • 0

This is how the code looks:

enter image description here

And I want to a border for the highlighted element, i.e. <div class="Comment">...</div>, how do I style it using CSS?

NOTE: Notice the class named ‘Comment’? It is used in both the highlighted element and it’s parent element. So, that’s probably why this one’s a bit tricky?

I tried the CSS codes below, and some others, and none worked.

.DataList .Item .comment, .DataList .Comment .comment,
.DataList .FirstComment .comment, .DataList .Mine .comment {
    border:1px solid #666;
    padding:10px;
    border-radius:3px;
        -moz-border-radius:3px;
        -webkit-border-radius:3px;
}

.DataList .Item div.comment, .DataList .Comment div.comment,
.DataList .FirstComment div.comment, .DataList .Mine div.comment {
    border:1px solid #666;
    padding:10px;
    border-radius:3px;
        -moz-border-radius:3px;
        -webkit-border-radius:3px;
}

What am I doing wrong? Hope someone can help me solve this small riddle. Thanks.

  • 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-31T02:11:00+00:00Added an answer on May 31, 2026 at 2:11 am

    first, try NOT styling with extreme specificity (adding parent/element selectors). this way, you can just use .Comment – note that they ARE case sensitive.

    if styles are overridden or you have selectors of the same name but different “context” (like you have a list item with .Comment and it’s child with div with .Comment), that’s when you use higher specificity (adding the parent/element in the selector) like div.Comment, .Item .Comment

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

Sidebar

Related Questions

This is what my code looks like: <div class=progress> <div class=total> <span class=current></span> </div>
my HTML code looks like this <TR Row=1 CLASS=ThemeAlignCenter> <TD id=wrdActive_Row1 style=width: 50px CLASS=rdThemeDataTableCell><SPAN
Here is my html code looks alike. <div style=width:70%; margin:0px auto; border:1px solid #000;>
I am writing some css code for a school website that looks like this
I've got some code that looks like this: <div id=shell> <div id=title>TITLE HERE</div> <div
I have two DIV elements. HTML looks like this: <div id=first><div id=second></div></div> The CSS
I want to statically allocate the array. Look at the following code, this code
I have code that I want to look like this: List<Type> Os; ... foreach
I apologize if this code looks a bit like a mess (considering the length);
My code looks like this NSNumber *inputToNumber = [NSNumber numberWithFloat:[textField.text floatValue]]; the value from

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.