CHAPTER 4
There are a few classes included that can be attached to various elements to perform some basic formatting of the element’s appearance.
By default, HTML elements appear as a square box. However, CSS allows you to set the border- radius property to create boxes with rounded corners. The W3.CSS framework provides several classes to easily create rounded corners.

Figure 14: Square box and rounded box
Table 6 lists the rounding classes. The larger the pixel size of the border radius, the more pronounced the rounded corners will be.
Table 6: Rounding classes
Class name | Border radius size |
w3-round | 4 pixels |
w3-round-small | 2 pixels |
w3-round-medium | 4 pixels (same as round) |
w3-round-large | 8 pixels |
w3-round-xlarge | 16 pixels |
w3-round-xxlarge | 32 pixels |
In addition to the rounded corners, the framework includes a w3-circle class to put the entire element in a circle (or oval), depending on the element size. You can nest circles within each other by adjusting the elements width using an inline style attribute.
The padding classes can be used to add a padding around the cell content. There are two types of padding classes. The numeric padding classes add top and bottom padding as specified by the class name. The size padding classes provide complete padding (all four sides) using size abbreviations.
The numeric padding classes are:
The size padding classes add padding to all four sides: top, bottom, left, and right. The classes are:
The margin classes allow you to add a 16-pixel margin to an element. The class allows margins to be added to all sides or to individual sides:
You can combine classes if you only need margins on some edges. The w3-section class is a shorthand class, the same as adding classes w3-margin-top and w3-margin-bottom to the element.
The W3.CSS framework provides classes to place borders around elements. The are several border classes available.
The basic border classes allow you to add a border around the entire element or one or more sides. The classes are:
You can add the w3-border-color classes to the border class (both classes are required) to change the border color. There are two class types for border colors:
Thicker borders (6 pixels) can provide a nice visual touch to an element, as shown in Figure 15.

Figure 15: Thick border example
The following CSS classes (which can be combined with border colors) can be used to create thick borders around an element:
The W3.CSS framework provides a number of classes to change the size of elements:
These classes can be applied to any element, such as text, buttons, badges, and tables.
The helper classes and color classes, combined with the other base classes, provide a tremendous amount of control over your webpage elements.