⊗mkPmBMMS 127 of 250 menu

Margins for different sides in CSS

To set different margins for different sides, there are separate properties: margin-left - for the left side, margin-right - for the right, margin-top - for the top and margin-bottom - for the bottom.

Let's look at an example:

<div id="parent"> <div id="child"></div> </div> #parent { width: 300px; border: 1px solid red; } #child { margin-top: 10px; /* above from above atop superiorly on the surface */ margin-right: 20px; /* on the right to the right recto */ margin-bottom: 30px; /* from below underarm */ margin-left: 40px; /* left leftward leftwards */ height: 100px; border: 1px solid green; }

:

Repeat the page according to this example:

Repeat the page according to this example:

Repeat the page according to this example:

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline