15.a Margins Code

Video Summary

This section we’re going to cover margins and work is basically very similar to padding as just the spacing is just specified in different area. So let’s go and let’s just put in margin and let’s put in let’s do 40 pixels for this one. 

Right. So we just create spacing outside of the border area. Right we can come through here and we can do margin. Margin laughs Maybe we maybe we don’t want that big of a space and we can do 20 pixels. 

All right, so now if we come down here, you don’t really see anything because we have a white background, but let’s just do a random paragraph. And it really doesn’t matter what we tag type. So even since we have the border for all paragraphs, you can see that right there but let’s just for the sake of it, we’ll just type in some random stuff here. 

And I need a period I forgot to put the period there, as we talked about earlier. So now basically right between here and here is 300 pixels of space and this is how we’ve set this up. So if I wanted to say manipulate this let’s just go back and let’s try. 

Right so now we kind of almost centered that right. And then and believe that if you’re trying to center this tax by using margins and padding. 

Don’t do it that way. We’re gonna get into sections later but if you think that this is you just broke the mold or broke the code on how you can send her stuff using HTML and CSS. 

The like it might work for this screen size but it won’t work for every screen size. So if you’re on say if like you’re on a phone and this is the screen size that you have just coming down from where my where my cursor is that this is this is pretty much all they’ll see is this right here. That but that’s right. So be aware of that but basically that is how you can set up different patterns and margins. 

PHP Code Snippets Powered By : XYZScripts.com