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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:45:57+00:00 2026-05-24T15:45:57+00:00

I am sorry if my question is not overly clear. I will first illustrate

  • 0

I am sorry if my question is not overly clear.

I will first illustrate my question with an exmaple:

<div id="parent">
  /*This contains a dynamically generated amount of children from 1 - 200*/
  <div class="child"></div>
</div>

Is it best practice/faster to style each child using .child {} or using #parent div {}

If there are 200 children then that is a lot of additional text.

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-24T15:45:58+00:00Added an answer on May 24, 2026 at 3:45 pm

    You should apply your styles in a semantical way. If you want to style all elements with class child, go ahead with .child. If you want to style all div below the parent, go for #parent div.

    The style should be easy to read and maintain, and if possible adopt to new “situations” automagically.

    If possible, you should also consider the size of your website. A #parent div without classes child for each div certainly is smaller than div.class and a class given for each div.

    So bascially, it all depends on what you want to do and your target audience. A regular desktop system with broadband connection can handle either, a handheld with slow and expensive GSM connection might not.

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

Sidebar

Related Questions

Sorry this question is not very clear, if I know the correct words to
Sorry if question is not clear. My vocabulary for terminology is bad. Anyways I
Sorry if this question is too vague, but I'd rather not muddy it's point
Sorry if this question sounds a little silly, but I am not sure what
Sorry this is not a very well defined question, I am thinking about an
Sorry but I am not sure how to ask this question but I am
NOTE: sorry as this is not a programming question but i am not aware
Sorry if this question is not programmatic enough, but it has significant implications to
I have updated this question(found last question not clear, if you want to refer
my first question sorry if this is too basic. I followed the tutorial Beginning

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.