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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:42:31+00:00 2026-06-11T08:42:31+00:00

Many ajax calls means you are getting content from different template views. In this

  • 0

Many ajax calls means you are getting content from different template views. In this case some ids could be repeated. So I am wondering about best logic how to name style rules.
I am currently deciding between two options:

  • Add a prefix to each id. Each selector will look like #templateName-idName
  • Wrap each template to a div with template name id. So each selector will start with #templateName #idName

What is your opinion about this. Is it a good idea to sepearate absolutely every id with some prefix?

  • 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-06-11T08:42:33+00:00Added an answer on June 11, 2026 at 8:42 am

    Using some form of psuedo namespace like prefixes for ids is a good idea to prevent collisions. From a CSS standpoint you should be trying to create more re-usable/consistent styling rules, and therefore generally avoid the use of ids for anything more than site structural elements and one off fixes. A combination of explicit class/id markers and combinator selectors should lead to clearer and more maintainable stylesheets. As far as ids go that would make the combined #container-child convention preferable for the initial namespacing reason and also to emphasize and take advantage of the uniqueness of ids.

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

Sidebar

Related Questions

Many people use this method to add animation on switching views. When I try
I'm using ajax to retrieve some data from the backend. I get the result
I want to make a stack of Ajax calls in this way: call(n) starts
Have a web-page with very complex structure and javascript logic with many ajax calls,
I have many asynchronous AJAX calls whose results will get processed. It doesn't matter
If I'm making an 'ajaxified' user interface with many ajax calls for creating, renaming,
I am converting some of my link_to_remote generators with link_to as the AJAX calls
I have an application I'm working on in which I make many AJAX calls
I have many forms that use AJAX (w/ jQuery) for validation and data submission.
I use an ajax ModalPopupExtender on many pages to display confirmation dialog. So 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.