18/03/2024 Education - Training
In CSS margins are used to control space around an HTML element.
Margins create space between other element and browser window
For individual sides(top, bottom,right,left) we can set different sizes of margins
Margins are completely transparent and doesn't have any background color
Margin properties can have the following values:
Length in cm, px, pt, etc.
Width % of the element.
Margin calculated by the browser: auto.
margin properties:
margin-top:Indicates the margin on the top of an element.
margin-right: Indicates the margin on the right side of an element.
margin-bottom:Indicates the margin on the bottom of an element.
margin-left: Indicates the margin on the left side of an element.
Note: The margin property allows negative values.
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of HTML elements on a web page. It controls layout, colors, fo...
Learning CSS is absolutely essential for any web developer, especially for those working on the front end (the part of the website users see). Here’s ...
CSS stands for Cascading Style Sheets. It is the language used to style and layout web pages — defining how HTML elements look on screen, paper, or in...
CSS tutorial or CSS 3 tutorial provides basic and advanced concepts of CSS technology. Our CSS tutorial is developed for beginners and professionals. ...
More Details