MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

CSS Tutorials

Margin In CSS
Previous Home Next

Margin clears an area outside the border.The margin represents the distance between the outer edge of the border and any neighboring elements. This is often a source of confusion as it’s easy to think of the margin as a kind of “padding” between elements. Better to think of it like the margin of a page, it represents the outer edge of the object.

The margin property applies space outside the box, between the box and the browser window, or between the box and the other elements in the document.

margin: <margin-top>
<margin-right>
<margin-bottom>
<margin-left>

 

Simple Example
<HTML>
<HEAD>
<TITLE>Examples of margins</TITLE>
<STYLE type="text/css">
UL { 
background:#666666; 
width:35%;
margin: 12px 12px 12px 12px;
padding: 5px 5px 5px 5px;
}
LI {  
background:red;
margin: 12px 12px 12px 12px ;
padding: 12px 0px 12px 12px;
list-style:none; 
font:Arial, Helvetica, sans-serif; 
color:#000000;
}
LI.withborder {
border-style:solid;
border-width: medium;
border-color:#FFFF00;
}
</STYLE>
</HEAD>
<BODY>
<UL>
<LI class="withborder">Element of list is
a bit longer to illustrate wrapping.</LI>
</UL>
</BODY>
</HTML>

Output

Previous Home Next