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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T08:40:46+00:00 2026-05-21T08:40:46+00:00

Right now, I have CSS like this: #lightbox2wrapper .panel-col-first .pane-node-title { text-align:center; color:#8A3B3B; font-weight:bold;

  • 0

Right now, I have CSS like this:

#lightbox2wrapper .panel-col-first .pane-node-title {
text-align:center;
color:#8A3B3B;
font-weight:bold;
font-size:inherit;
margin-bottom:5px;
}

The particular .panel-col-first .pane-node-title will occurred in more than one DIV. I do not want to use syntax like

#lightbox2wrapper .panel-col-first .pane-node-title, #div1 .panel-col-first .pane-node-title, #div 2 .panel-col-first .pane-node-title {
... ...
}

It will make CSS very long. How to make the above markups shorter?

Thank you.

  • 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-21T08:40:46+00:00Added an answer on May 21, 2026 at 8:40 am

    If your logic must explicitly follow “apply to A only when it appears in B and only if B is also in ( C | D | E | F …)

    Then, sorry, but there is no other way to specify this logic with CSS.

    Note: you don’t have to run all the selectors on one line. E.g., you could write:

     #lightbox2wrapper .panel-col-first .pane-node-title,  
     #div1 .panel-col-first .pane-node-title {    
        text-align:center;  
        color:#8A3B3B;  
        [etc.]  
     }
    

    If you still don’t like such lengthy selectors, one thing to consider is shorter class-names. Do you have access to the code to change them?

    And you have access to modify all the potential target elements’ class-names, you might want to just create a new class for that situation, apply all the styles to that class, and make sure that this class is put on the target elements. Your CSS selectors then would no longer expresses this logic explicitly, but it would still work. Specificity might still be an issue, though, if you’re trying to override other styles applied to those elements.

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

Sidebar

Related Questions

So right now I have an input validation method structured something like this: function
Right now I have this SQL query which is valid but always times out:
Right now I have double numba = 5212.6312 String.Format({0:C}, Convert.ToInt32(numba) ) This will give
I have a simple form right now: <form action='<? echo $PHP_SELF;?>' method='POST'> Username:<input type='text'
I have multiple projects with directory structure like this: /application/ /images/ /js/ /css/ /system/
Right now I have a button with a span in it, I would like
I am using animate.css and right now I have a CSS style for animated2500
I have a container background defined in CSS like this; .container { background:#fff; margin-left:auto;
I have two images with the title Show Options it looks like this: <a
I have this line of jQuery: $(#colorimage).css('background','url(images/bw.jpg)'); First question: the way that this is

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.