// page information $page_type = "t"; $page_title = "CSS Margin Properties"; $page_keywords = "css, css parameters, margin parameters, margin properties, margin-top, margin-right, margin-bottom, margin-left, margin"; $page_description = "CSS margin parameters and properties tutorial. Find more tutorials and scripts at TheScripts.com, a programming and software development resource, directory and community."; $page_articletitle = "Margin Properties"; $page_next_url = "/clientsidescripting/dhtml/css/tutorials/cssparameters/page6.html"; $page_next_anchor = "Padding Properties"; $page_prev_url = "/clientsidescripting/dhtml/css/tutorials/cssparameters/page4.html"; $page_prev_anchor = "Border Properties"; $page_author = "Mark Hardy"; $page_byline = "Administrator, TheScripts.com"; // site header include ($_SERVER["DOCUMENT_ROOT"]."/header.php"); // begin html ?>
margin-top
Allows you to set the spacing at the top of an element. You can have negative values (e.g. - 2px), however, please be careful using this one, because if you specify a high negative value (or rather really low) you can cause the visitors browser to crash.
P {margin-top: 15px;}
margin-right
Allows you to set the spacing to the right of an element. You can have negative values (e.g. - 2px), however, please be careful using this one, because if you specify a high negative value (or rather really low) you can cause the visitors browser to crash.
P {margin-right: 15px;}
margin-bottom
Allows you to set the spacing at the bottom of an element. You can have negative values (e.g. - 2px), however, please be careful using this one, because if you specify a high negative value (or rather really low) you can cause the visitors browser to crash.
P {margin-bottom: 20px;}
margin-left
Allows you to set the spacing to the left of an element. You can have negative values (e.g. - 2px), however, please be careful using this one, because if you specify a high negative value (or rather really low) you can cause the visitors browser to crash.
P {margin-left: 15px;}
margin
Allows you to set the general spacing that will be used on all sides of an element. You can have negative values (-2px), however, please be careful using this one, because if you specify a high negative value (or rather really low) you can cause the visitors browser to crash.
P {margin: 10px;}