WEBVTT FILE 1 00:00:06.319 --> 00:00:11.700 in this video we're gonna learn how to set margins for HTML elements 2 00:00:11.700 --> 00:00:17.520 first of all let's start with the Facebook div the syntax is pretty easy 3 00:00:17.520 --> 00:00:24.930 we're gonna use margin for the Facebook Dave we're gonna use one value to set 4 00:00:24.930 --> 00:00:33.050 the same margin from for all sites so if we set that to 20 pixels for instance 5 00:00:33.230 --> 00:00:37.620 so basically we're setting a margin of 20 pixels from all sides and what does 6 00:00:37.620 --> 00:00:41.219 that mean so that means that Facebook is gonna 7 00:00:41.219 --> 00:00:50.010 have a gap between itself and any outside or any other elements or borders 8 00:00:50.010 --> 00:00:56.820 of the containing elements of 20 pixels from all sides so that's what the margin 9 00:00:56.820 --> 00:01:04.290 means okay and if we move to the Emotiv we are going to define the margin this 10 00:01:04.290 --> 00:01:12.360 time using 4 values so let's choose 60 pixels for the top 10 pixels for the 11 00:01:12.360 --> 00:01:19.310 right side 30 pixels for the bottom one and then 20 pixels for the right one and 12 00:01:19.310 --> 00:01:25.170 basically what we have done here is that we defined different margins for each 13 00:01:25.170 --> 00:01:33.600 side and just the comments the new distance between the Facebook div and 14 00:01:33.600 --> 00:01:39.299 the Apple wave which is from the border to the border is gonna be the sum of the 15 00:01:39.299 --> 00:01:47.009 bottom margin of Facebook and the top margin of Apple all right now let's move 16 00:01:47.009 --> 00:02:00.420 to the Microsoft div and let's set a margin using two values okay so first 17 00:02:00.420 --> 00:02:08.220 poly is gonna define the top and bottom sides margins and the second one is 18 00:02:08.220 --> 00:02:13.610 going to define the margin for the right and left sides 19 00:02:14.180 --> 00:02:17.299 all right you