/

HTML / CSS / JavaScript Tutorial

CSS Edge Multi-Value Formats

[this page | pdf | back links]

Several aggregate CSS edge (border, margin, padding) properties can take multiple values. Depending on the number of values supplied the rule for deciding which value is applied to which edge is given below:

 

Number supplied

E.g.

Which values are applied to which edge

1

x1

x1 applied to all four edges

2

x1 x2

x1 applied to top and bottom edges

x2 applied to right and left edges

3

x1 x2 x3

x1 applied to top edge

x2 applied to right and left edges

x3 applied to bottom edge

4

x1 x2 x3 x4

x1 applied to top edge

x2 applied to right edge

x3 applied to bottom edge

x4 applied to left edge

 


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile