A heading with a solid red bottom border
The CSS border properties allow you to specify the style, width, and color of an element's border. If the border-style property has four values:. Example An outset border: Default value is "medium" border-bottom-style Required. This will not work if there is padding between the table cells. You can't put a border on a tr element. W3Schools is optimized for learning, testing, and training.
CSS border-style property
Jpduro 4 3. The border-width property can have from one to four values for the top border, right border, bottom border, and the left border. From the examples above you have seen that it is possible to specify a different border for each side. Notice that the table in the example above has double borders.
Description: Thats the way I would do it too! RaduSimionescu Wrong, it works perfectly fine on the tr with border collapsed. Since you cannot apply a border to tr tag, you need to apply it to the td or th tags like so:. The width can be set as a specific size in px, pt, cm, em, etc or by using one of the three pre-defined values: Your message has been sent to W3Schools.