How to apply CSS to buttons?

Tags: css

Problem :

I want apply CSS to all my buttons but not referencing all buttons id in my CSS stylesheet. How to proceed?

<button id="buttonEdit">Save</button>

I already try:

    fonr-size: 80%;

but this doesn't work.

Thank you.

Solution :

Do you have styles associated with the buttonEdit id in your CSS?

I've just copied in your button to a "Try It Yourself" area on W3Schools, and added my own style in the header

button { font-size: 80%; }

As everyone else has already posted, and it worked. I did a before test to see the button, then added the style & refreshed. Button text got smaller.

If there are no styles associated with buttonEdit that could be messing things up, then I'd triple check you didn't accidentally forget the colon after font-size.

    CSS Howto..

    How to make link unclickable using CSS or jquery? [duplicate]

    How to position an element at the TOP LEFT corner of a page using CSS?

    How to hack unsupported mix-blend-mode CSS property?

    How to create an integrated row in the table?

    How can I have % of width of an img wrapped in a specific div width?

    CSS: How to add classes to existing grid that allow skipping columns on the left side

    How to disable properties of external css class and use internal css class with same name but different property in html

    How to align to the center a div with position absolute within a div with position relative?

    How do i get a font to show up smooth like this?

    HTML/CSS- how to align part of a cell to the left, and part to the right?

    How can .css('display') be block, [0].hidden be false, and .is(':hidden') be true?

    Some doubts about how exactly grid BootStrap component work? [closed]

    Responsive CSS background image - how to make content follow

    how to create a css translateY on hover effect

    How to push floated element to below another floated element?

    How to vertically align

    tag in navbar

    How to apply css style to jquery effect

    How to center vertical inside header?

    How do I isolate floated content?

    CSS: How to load a css file for all browsers except IE?

    How to create an enumerated tabular environment in HTML/CSS?

    How to add border inner side of image using CSS

    CSS - how to make content fit to the width/height of paragraph?

    How do I use CSS and JS files within a HTML file being sent with Express?

    how to create two divs shapes to overlay each other

    How do I show divs in an IE print preview page that are programmatically hidden via javascript?

    How to set width of DIV to span with text inside it (so not fixed)

    How to style all the same XSL FO elements? XSL FO like CSS?

    How do I add a CSS class to a BoundField, so I can find it with jQuery?

    How do I post a jsfiddle example of some trouble I'm seeing in Rails?