/ Published in: CSS
URL: http://phpforms.net/tutorial/tutorial.html
It determines a space size from each border of an element. A space is the space from border of a current element to internal border of its parental element
Expand |
Embed | Plain Text
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <title>margin</title> <style type="text/css"> BODY { margin: 0; /* Remove indents */ } DIV.parent { margin: 20%; /* Margins around the element */ background: #fd0; /* Background color */ padding: 10px; /* Areas around the text */ } DIV.child { border: 3px solid #666; /* Frame parameters */ padding: 10px; /* Areas around the text */ margin: 10px; /* Margins around */ } </style> </head> <body> <div class="parent"> <div class="child"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. </div> </div> </body> </html>
You need to login to post a comment.
