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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:17:09+00:00 2026-06-02T02:17:09+00:00

Is it possible in CSS to override a property if that property doesn’t have

  • 0

Is it possible in CSS to override a property if that property doesn’t have a default value?

For example, say your primary stylesheet defines a border for a particular element:

#element {
  border: 1px solid #000;
}

If you wanted to disable the border from a secondary stylesheet, you could do this:

#element {
  border: none;
}

Assuming the secondary stylesheet was loaded after the primary one, the border: none rule would take precedence and remove the border.

But what if you were trying to override a property that doesn’t have a default or null value?

#element {
  position: absolute;
  left: 0;
}

Now say, in your secondary stylesheet, you wanted to do this:

#element {
  right: 0;
  top: 0;
}

And you didn’t want any value for left. There’s no such thing as left: none;, so…how do you “undeclare” the left property assigned in the primary stylesheet?

  • 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-02T02:17:10+00:00Added an answer on June 2, 2026 at 2:17 am

    If I’m reading your question correctly, do you want to, in one stylesheet, “erase” a declaration that you have in another stylesheet, such that the property will compute to the default value?

    There’s currently no way to reset it to whatever the value a browser uses as the default for a given element. The closest you can get is with the CSS3 initial keyword, which resets a property to its initial/default value according to the spec rather than according to how a browser defines it:

    #element {
      left: initial;
      right: 0;
      top: 0;
    }
    

    There’s not much browser support for it besides in Safari/Chrome and Firefox (as -moz-initial), so your next best alternative is to look up the initial value and hardcode it. For the left property, it’s auto (and I believe it’s this value for any element in all browsers anyway), so:

    #element {
      left: auto;
      right: 0;
      top: 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible in CSS using a property inside an @page to say that
Let's say we have a massive CSS file that is used to style the
Possible Duplicate: CSS Opacity Property I'm making a layer on an image which has
Okay, I know that 1) this is probably not possible with CSS alone and
Is it possible to use CSS sprites for foreground images -- i.e. images that
I need your help. I have made a really clean and simple example to
Possible Duplicate: Css z-index problem I have an issue where one image is infront
I have several stylesheets. The first one is a stylesheet with some styles that
Possible Duplicate: How do I get this CSS text-decoration override to work? Take a
Is it possible to make a css declaration override a style set in the

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.