Badly Explaining CSS Stuff

I was told to explain stuff like margin, content, padding, etc. so here it is.

First I’ll start with content since most of the code revolves around it, content is basically the stuff you display in your site, like text, images, and videos.

Next is margins, margins are basically used to make space outside the area of any elements.

.container{
    margin: 10px;
}

Padding is like margins, but it makes space inside the element instead of outside.

.container{
    padding: 10px;
}

With borders, it should be self explanatory, when you add a border to a piece of code it basically surrounds it with whichever color you give the border

.container{
    border: 10px #fffff;
}

Posted

in

by

Tags:

Comments

2 responses to “Badly Explaining CSS Stuff”

  1. Mr. Wilmoth Avatar
    Mr. Wilmoth

    Nice explaination. Do you know what color #ffffff is?

Leave a Reply

Your email address will not be published. Required fields are marked *