3

I have CSS rules on button input:

button {border:solid 1px black;}

As long as I apply any border to an input or button, the browser switches the presentation of that input form OS (rendered by OS with shadowed butotn, rounded corners, hoover cyan etc.) to standard box-model.

Now I want to revert that for some class of buttons. For example I want:

<button class="default-os">Looks like Windows-made</button> to look like without any styles at all.

Is there a way to do that? I have tried various none and inherit values of CSS rules, but none of them works.

3 Answers 3

5

I'm going to say the answer is "no way" sorry :/

I would find some way reversing it - apply your custom button style via a class, then just don't add the class to the "regular" buttons. If you can't modify the HTML for some reason then you might have to get creative with your CSS selector rules, but I'd have to see the HTML in question.

Sign up to request clarification or add additional context in comments.

Comments

3

Try reversing what you are doing. Instead of trying a 'default-os' class, change your button style to '.styled-button' and specify that on the box-element buttons, and then don't specify a class on the buttons you want to have the default OS look.

Comments

2

It would be easier to give your button a special class when you want to change it with the border and leave it untouched.

However you could try to use !important to get it back to behaving normally with a combination of things.

.default-os{
  border: none !important; 
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.