Himas Rafeek
Posted on: 1 year ago
CSS

6 even spaced elements across the page using calc() for sizing

The CSS calc() function can be used anywhere a length, frequency, angle, time, number, or integer is required. It can be used to apply values for width/height; font-size; margins; padding; borders; shadows; border radius; text-indent;top/right/bottom/left(for position); and any place that a number is required.


                                          .formbox {
    width: calc(100% / 6 - 1px);
    /* 1px slack is required as workaround for IE sizing bug */  float: left;
    text-align: center;
}