Revision 63c0e334
Added by Phil Davis over 8 years ago
src/usr/local/www/index.php | ||
---|---|---|
396 | 396 |
|
397 | 397 |
<div class="row"> |
398 | 398 |
<?php |
399 |
$columnWidth = 12 / $numColumns;
|
|
399 |
$columnWidth = (int) (12 / $numColumns);
|
|
400 | 400 |
|
401 | 401 |
for ($currentColumnNumber = 1; $currentColumnNumber <= $numColumns; $currentColumnNumber++) { |
402 | 402 |
|
Also available in: Unified diff
Allow 5 dashboard columns to work
Selecting 1,2,3,4 or 6 dashboards columns results in an exact integer result here and all is good. But 5 columns results in "2.4" and "col-sm-2.4" is not a thing in bootstrap.
We need just the best int we can choose here, which is one that is just the int part of the division. That ensures that the 5 columns extend over less than the standard bootstrap total of 12 "units" wide.
(cherry picked from commit d86cff7f61af51ee2bd9df9df309576b11d7ecc6)