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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:46:53+00:00 2026-05-31T07:46:53+00:00

I am working on a website that was built four or five years ago

  • 0

I am working on a website that was built four or five years ago and I ran across something that I have never seen before. Who ever built the site is using both classes (.home.product) to call any sub-elements (.banner) in the page. I didn’t think you could do this, but obviously it works. Is this a hack or is it kosher? If this is ok to do can you also do it with an ID? (Example: #home.product)? I hope my question makes sense.

<head>           
<style>     
.home.product .banner{
 background:#d1d1d1;
 border:solid 1px #000;
 width:500px;
 height:150px;
 }
</style>     
</head>    
<body class="home product">  
  <div class="banner">Blah Blah Blah</div>   
</body>

Thanks for the help!

  • 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-31T07:46:55+00:00Added an answer on May 31, 2026 at 7:46 am

    It is perfectly valid and normal to specify multiple classes on a single HTML element, and to target them with multiple, chained class selectors in CSS. There’s nothing hacky about it at all.

    And yes, you can also chain any number of ID selectors, class selectors, attribute selectors and pseudo-classes with one another in any order. Both #home.product and .product#home are equivalent, matching an element with an ID of home as well as a product class.

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

Sidebar

Related Questions

I have a website I've built in django that I'm trying to get working
I am going to start working on a website that has already been built
Got a situation where we have a working production website that is moving to
I'm working on changes for a website that was built by someone who worked
I have built a simple tour on my website that will be coded using
I have built a test website using nopCommerce open source , Everything is working
I'm working on a fairly large web site built in PHP that will potentially
Working on a website that has Employee and Branch entities, using a database table
I'm working on a website that will switch to a new style on a
I'm working on a website that uses lots of png24 files, for transparency. I

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.