how can we set the margins for an element in html
Answers
Answered by
51
Answer:
The CSS margin properties are used to create space around elements, outside of any defined borders. With CSS, you have full control over the margins. There are properties for setting the margin for each side of an element (top, right, bottom, and left).
Answered by
14
Answer:
You can set the margin property to auto to horizontally center the element within its container. The element will then take up the specified width, and the remaining space will be split equally between the left and right margins.
Similar questions
Computer Science,
6 months ago
Math,
6 months ago
Math,
1 year ago
English,
1 year ago
Chemistry,
1 year ago