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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:29:48+00:00 2026-05-18T02:29:48+00:00

I am creating a extension for Internet Explorer where I am injecting CSS-styled span

  • 0

I am creating a extension for Internet Explorer where I am injecting CSS-styled span tags on webpages. If a specific part of this component is clicked on, a popup is shown.

This popup is in reality a “DIV”-element that I am injecting at the very end of the content page:s “BODY”-tag. I have a CSS-styled table inside this div, and depending on which site I am on, the appearance of this popup is either according to specification (in regards to width, and so on), or not.

I don’t have that much knowledge when it comes to CSS and such, but can this be because the “parent” page already has some CSS for “BODY”, “DIV”, or “TABLE”-elements that is being inherited by my elements?

If this is the case, is there any way of stopping this?

  • 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-18T02:29:49+00:00Added an answer on May 18, 2026 at 2:29 am

    There are (at least) two means of doing this1, but they’re both a little messy.

    Use an iframe with its own css (this way the pages are separated by being two entirely different web-pages).

    Use increased specificity to target the inserted html elements.

    body {
      /* targets the 'body', and these styles are inherited by its descendant elements */
    }
    
    body div {
      /* targets all divs that are contained within the 'body' element */
    }
    
    body > div {
      /* targets only divs that are directly contained within the body element */
      /* and these styles will/may be inherited by the children of these divs */
    }
    

    The problem with this latter approach, is that you’re having to explicitly specify almost all the possible permutations. And there will always be edge cases that aren’t accounted for. You’d be best off using class-names to specify the styles for the new content:

    .insertedDiv {
      /* this will apply to all elements of class 'insertedDiv', but may be overridden */
      /* by a more specific id-based selector such as '#container > .insertedDiv' */
    

    1. But I can only think of these two at the moment.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a Firefox extension for demo purposes. I to call a specific JavaScript
I am creating a Firefox Extension...what would be the javascript to open a URL
Creating Traversals for Binary Search Tree with Recursion. void inOrder(void (*inOrderPtr)(T&)) { if(this->left !=
I am creating a shell extension in C++ (ATL 9) using Visual Studio 2008.
ClickOnce is currently a very undersupported technology in my opinion. Currently only Internet Explorer
I am creating extension methods for the HtmlHelper class in an MVC web app.
Currently i am creating an extension method that accepts parameters. Using the below example,
I am creating an extension for Visual Studio 2008, and because I didn't want
I am creating firefox extension. I need to use sockets. I need it to
Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select

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.