Adding Margins to Your Webpage
Hello everyone! Want to learn how to give your webpage some character?
Ok, well first you have to have a webpage and an external css styling sheet.
To make it center the whole website on the page and give a little extra room on all the sides you have to write in your body syntax. Your CSS styling sheet should look like:
You may already have declarations within the body syntax but we are just adding one more. Between the brackets type “margin:” and then the amount of pixels that you would want your margins to be. Also, never forget to add a “;” to the end of your value. So, your finished product would look like:
This will make your webpage look a lot better because it won’t all be pushed up against the top left. Don’t forget that your selector is body, so it will be applied to the whole page!
Thanks for reading! I hope it helped!