15. Margins – Slides

				
					
p{
margin: 20px;
margin-left: 10px;
margin-right: 5px;
margin-top: 15px;
margin-bottom: 30px;
}
				
			
				
					
p{
margin: 20px 10px;
margin: 10px 5px 15px 30px;
}
margin: 20px(top/bottom) 10px(left/right);
margin: 10px(top) 5px(right) 15px(bottom) 30px(left);
				
			

Video Summary

All right, we’re about to go over the CSS property margins. Margin is the way that you can space. You can give space around your element outside of the border. This really helps for positioning and spacing in between elements. And this is very similar to how margins are set up. They have the same the same basic property syntax. You have your margin you can do left right top or bottom. And if we go over to the shorthand version, it stays the same you can have margins be you know you can have you can specify the top and the bottom of how much spacing you want and the left and right side of your element, how much spacing you want, or you can even go through and set up the left, right, or the top right bottom left of the spacing for the element. So since we’ve gone over borders, we’ve gone over headings I think it’s best just to hop right in and I can show you what margins are set up with cotton So let’s hop over there.

PHP Code Snippets Powered By : XYZScripts.com