0

I'm trying to add a series of buttons inside some divs programmatically.

Here is the code:

Why is the width: 110px being ignored?

2 Answers2

1

The button has a width of 110px but is placed in a div that only has a width of 8.3333%. This comes from the .s1 class. Removing the class shows each button with a 110px width as desired.

.row .col.s1 {
    /* width: 8.3333333333%; */
    margin-left: auto;
    left: auto;
    right: auto;
}
depiction
  • 772
  • 6
  • 16
0

The stylesheet included materialize.min.css has a class .col.s1 that has a width of 8.3333...%. You will need to override this in your css

div.col.x {
    width: 110px !important;
}

I usually don't like using !important unless necessary but without more of your code to look at, this could do it.

David Kago
  • 326
  • 3
  • 3