List the steps to set margin and padding space in the Box Model.
What will be an ideal response?
Setting Margin and Padding Space in the Box Model
• To set the margin space around an element, use
margin: length;
where length is the size of the margin using one of the CSS units of measure.
• To set the padding space within an element, use the following:
padding: length;
• To set a margin or padding for one side of the box model only, specify the direction (top, right, bottom, or left). For example, use
margin-right: length;
to set the length of the right margin.
• To set multiple margin or padding spaces, specify the values in a space-separated list starting from the top and moving clockwise around the element. For example, the style
margin: top right bottom left;
sets margins for the top, right, bottom, and left sides of the element, respectively.
• To set matching top and bottom values and matching right and left values for margins and padding, enter only two values. For example, the style
margin: vertical horizontal;
sets margins for the top and bottom sides of the element to the value specified by vertical, and sets margins for the right and left sides of the element to the value specified by horizontal.
You might also like to view...
What does it mean to outsource services?
What will be an ideal response?
What is the escape sequence for double quote?
A. /” B. \” C. \’ D. /’
What is File name extension?
What will be an ideal response?
________ is a quick way to arrange open windows by dragging them to the edge of the screen
Fill in the blank(s) with correct word