Wednesday, 20 January 2016

Controlling the Margins

¢To define the margins of an element, use:
—margin:value

—where value = a length value (“em” is often used), a percentage (a margin proportional to the element’s width, or auto

¢To set margins on a side, use:
—margin-top
—margin-right
—margin-bottom
—margin-left

¢E.g.,  LI {margin-left:2em; margin-

right:2em; margin-top:1em; margin-

bottom:1em}

0 comments:

Post a Comment