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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:32:13+00:00 2026-05-17T18:32:13+00:00

My browser extension embeds a div item to webpages opened by browser on the

  • 0

My browser extension embeds a div item to webpages opened by browser on the fly. div contains several children items such as buttons, spans, input boxes etc.

Problem is when div is inserted to page, page’s css affects the div and it’s contents.

For example if the page has a css such as :

span {
 text-shadow: 1px 1px 1px blue;
}

then the spans in my on the fly added div have blue text shadows. What i’m doing to fix this is to set any possible directive that might affect my div’s content with !important, like

mydiv span {
  text-shadow: none !important;
}

and it’s rubbish.

Is there any sane way to override css for a given item, that’ll take it back to browser (google-chrome) defaults?

Thanks.

  • 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-17T18:32:13+00:00Added an answer on May 17, 2026 at 6:32 pm

    Is there any sane way to reset the css to browser defaults for only a single item?

    Sadly, no. The auto value will act as the default under some conditions, but not always, and you still have to specify it for every possible property. This is something about CSS that really sucks.

    One idea comes to mind, though. Seeing as you’re asking specifically about Chrome, if you control all the CSS classes and don’t mind some clutter, you might be able to work with CSS3’s not like so:

    span:not(.default) {
     text-shadow: 1px 1px 1px blue;
    }
    

    If you use not(.default) in every CSS rule, you can have elements that have the default behaviour if you give them the default class:

    <div class="default">
    

    I have no personal experience with CSS 3, but this should work. It will not work in older browsers, so it’s not (yet) really mainstream compatible.

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

Sidebar

Related Questions

It's probably some browser extension or a proxy. For example, I open google.com, and
I'm building a browser extension that will insert a chunk of HTML into some
i am thinking of a browser extension for facebook. now in the app details
What are the best approaches / tools to test browser extensions? In my case
Can anyone suggest some good browser add-on tools/extensions to help with development? I have
Which browsers other than Firefox support Array.forEach()? Mozilla say it's an extension to the
Everyone remembers google browser sync right? I thought it was great. Unfortunately Google decided
I am writing a Browser Helper Object for ie7, and I need to detect
Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't
What is iPhone's browser tag and how iPhone optimized web site is different from

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.