1

I'm trying to set a width on a button in Sharepoint online, but the style does not work. It's as if he has a shallow width.

html

<button style="height:20px;width:20px;" type="button" id="diminuiAcrescimo">-</button>

Does anyone know why and how to solve it?

2 Answers 2

2

Are you check your master page or any css files that affect on the button in general something like this:

 button {
  width:/*any value*/;!important
  height:/*any value*/;!important
 }

If the above solution is not working try to debug your code to obtain where the style is modified.

GoodLuke!

2

Just add your custom Class or Id to your button and define the CSS for that particular selector.

<button style="height:20px;width:20px;" type="button" id="diminuiAcrescimo">-</button>

Use like:

#diminuiAcrescimo
{
height:value !important;
width:value !important;
}

OR

<button class='clsButton' style="height:20px;width:20px;" type="button" id="diminuiAcrescimo">-</button>

Then

.clsButton
 {
 height:value !important;
 width:value !important;
 }

Not the answer you're looking for? Browse other questions tagged or ask your own question.