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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:46:06+00:00 2026-05-15T22:46:06+00:00

Take this code: #wh_wrapper #slider .scrollButtons.left { width: 100px; } the width of 100px

  • 0

Take this code:

#wh_wrapper #slider .scrollButtons.left {
  width: 100px;
}

the width of 100px is being applied only to:

#wh_wrapper -> #slider -> scollButtons left

If I do this:

.left {
   width: 50px;
}

all the

.left

classes has now a width of 50px, including the one from before.

Now, I completely understand how to avoid this error (setting specific classes, putting .left before #wh_wrapper #slider .scrollButtons.left etc..) what I’m asking is if there is a way to specify properties that cannot be overwritten by “global” properties.

I hope I was able to explain myself.

Thanks

EDIT:

I now understand !important 🙂

But look at this other example:

#wh_wrapper #slider .scrollButtons.left {
  width: 100px !important;
}

.left {
   width: 50px;
}

Now #wh_wrapper #slider .scrollButtons.left will still be 100px, but what about:

.left {
   width: 50px;
   border: 1px solid #000;
}

since I haven’t decalred a border before I can’t put an important on it, still the #wh_wrapper #slider .scrollButtons.left will now have a border property.
Any way areound 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-15T22:46:06+00:00Added an answer on May 15, 2026 at 10:46 pm

    Yes, put !important behind them:

    .class{
     height:100px !important;
     width: ...etc
    }
    

    Watch out though: Internet Explorer 6 and previous versions simply ignore !important, while IE 7 supports them. More info on this can be found here or here.

    !important is something to consider, butyou should try to avoid it. Most of the times it can be avoided by building a better html/css tree or adding a class (try to keep them generic though ;)).

    @EDIT: You should always put the most generic selectors on top, and the build down to the more specific ones. for example: put a img{} selector on top to provide a global specifier for all your images, then you go down more and more specific.

    wrapper img{}
    wrapper container img{}
    wrapper container div.something img{}

    and so on. Don’t try to overdo the classes and ID’s, the more generic your html/css is the better. containers and wrappers are often overused and unnescessary. Try to write good semantic html and keep html and css seperated. Don’t use css when you should us HTML (and vice versa)

    Often it is better to create your whole html file, and when everything looks good, provide css for the finishing touch.

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

Sidebar

Ask A Question

Stats

  • Questions 536k
  • Answers 536k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It ain't pretty, but it works. I'd be interested in… May 17, 2026 at 1:24 am
  • Editorial Team
    Editorial Team added an answer You can do this from the Symbols option page Tools… May 17, 2026 at 1:23 am
  • Editorial Team
    Editorial Team added an answer Can you post the rest of your code as the… May 17, 2026 at 1:23 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Take this code: <?php if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; } if
Take this code: using System; namespace OddThrow { class Program { static void Main(string[]
hi, i am not sharing code. the problem is in this code please take
By way of explanation, take this value type in C#: struct ObjRef { public
Take this simple example: a = [1 2i]; x = zeros(1,length(a)); for n=1:length(a) x(n)
I need a Visual Studio regex to match swallowed exceptions. This is as far
I've inherited this project from the previous guy, and I'm presently in the process
First of all, I'm fairly sure snapping to grid is fairly easy, however I've
Using SubSonic3, I have this generic method (thanks to linq guy, James Curran): public
I wrote a Haskell code which has to solve the following problem : we

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.