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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:44:16+00:00 2026-05-11T12:44:16+00:00

my HTML page contains a div with an id called main, and i am

  • 0

my HTML page contains a div with an id called ‘main’, and i am including another HTML page in to my HTML page, which contains a div with the same id(‘main’). i need to append a name space to the id(‘main’) of my HTML page.

I am including header,footer from another site and including content from my site to that HTML page. If that other sites uses the same id as my site is using, here the conflict is occurring.

In this HTML page two css files are including. If both of them containing same class with a different style here there is a problem.

I need to apply my css file to my code and another one to remaining code. can any body solve my problem?

  • 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. 2026-05-11T12:44:16+00:00Added an answer on May 11, 2026 at 12:44 pm

    I agree with everyone so far, in that there is no native CSS namespace capability and that if you have control (or the desire/capacity) to edit your HTML then that’s the best approach.

    One way to automate the process would be to write a script (PERL, PHP, .NET, etc.) to parse the HTML you’re pulling in and replace any existing ID’s or classes with a modified version.

    i.e. <tag id='theID' class='theClass anotherClass'> becomes <tag id='NAMESPACEtheID' class='NAMESPACEtheClass NAMESPACEanotherClass'>

    You could accomplish this with some creative regular expressions, although it would get trickier if there’s Javascript code that would need to be modified as well.

    As far as performance goes, this would be a big hit depending on the size of the file and you’d probably want to cache the result, or rewrite the original file.

    Let me know if you decide to go that route, the idea actually sounds a bit intriguing and could have a place in my toolbox!

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

Sidebar

Related Questions

I have a page that contains an iframe that gets loaded using Javascript: index.html
Here is what I am trying to do in ASP.NET: Create one page called
Okay, here is my situation. I have a page, index.php, which is the mainsite
I have a page that contains an element, <displayedimage> , that is not getting
I have an ASP.NET MVC Partial View that contains a Html.TextBox that is configured
I'm not sure what to call this question, since it involves a variety of
Ok, so, that title is a mouthfull... But, I reckon you understand what I'm
I saw a post on this already, but it didn't really provide a solution
There's a very simple jquery plugin: autotextarea. I'd like to teach it one little

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.