filmov
tv
Learn Javascript - Full course for beginners #14 - Margin, Padding and JS - Learning javascript

Показать описание
Learn Javascript - Full course for beginners - Lesson 14 - Margin, Padding and JS - Using Margin, Padding and other CSS elements in Javascript - Learn about margin and padding.
Learn javascript in a step by step manner in this lesson video series with examples and samples.
Learn JS (Javascript) For Beginners, Learning javascript from scratch, java scripting tutorial for beginners and java scripting tutorial for beginners 2020 are important keywords.
Learn JS programming right from the fundamentals in a fun and easy way. If you are a beginner and are eager to want to learn Javascript, then you are watching the right thing. This entire video series is for you. In this complete JavaScript for beginners series we will cover, learn and do -
- The core Basics & Fundamentals of JS
- Live JavaScript uses cases and Examples
and a lot more.
The margin property sets or returns the margins of an element.
This property can take from one to four values:
One value, like: div {margin: 50px} - all four margins will be 50px
Two values, like: div {margin: 50px 10px} - the top and bottom margins will be 50px, left and right margins will be 10px
Three values, like: div {margin: 50px 10px 20px}- the top margin will be 50px, left and right margin will be 10px, bottom margin will be 20px
Four values, like: div {margin: 50px 10px 20px 30px} - the top margin will be 50px, right margin will be 10px, bottom margin will be 20px, left margin will be 30px
Both the margin property and the padding property insert space around an element. However, the difference is that margin inserts the space around the border, while padding inserts the space within the border of an element.
The padding property sets or returns the padding of an element.
One value, like: div {padding: 50px} - all four sides will have a padding of 50px
Two values, like: div {padding: 50px 10px} - the top and bottom padding will be 50px, left and right padding will be 10px
Three values, like: div {padding: 50px 10px 20px} - the top padding will be 50px, left and right padding will be 10px, bottom padding will be 20px
Four values, like: div {padding: 50px 10px 20px 30px} - the top padding will be 50px, right padding will be 10px, bottom padding will be 20px, left padding will be 30px
Learn javascript in a step by step manner in this lesson video series with examples and samples.
Learn JS (Javascript) For Beginners, Learning javascript from scratch, java scripting tutorial for beginners and java scripting tutorial for beginners 2020 are important keywords.
Learn JS programming right from the fundamentals in a fun and easy way. If you are a beginner and are eager to want to learn Javascript, then you are watching the right thing. This entire video series is for you. In this complete JavaScript for beginners series we will cover, learn and do -
- The core Basics & Fundamentals of JS
- Live JavaScript uses cases and Examples
and a lot more.
The margin property sets or returns the margins of an element.
This property can take from one to four values:
One value, like: div {margin: 50px} - all four margins will be 50px
Two values, like: div {margin: 50px 10px} - the top and bottom margins will be 50px, left and right margins will be 10px
Three values, like: div {margin: 50px 10px 20px}- the top margin will be 50px, left and right margin will be 10px, bottom margin will be 20px
Four values, like: div {margin: 50px 10px 20px 30px} - the top margin will be 50px, right margin will be 10px, bottom margin will be 20px, left margin will be 30px
Both the margin property and the padding property insert space around an element. However, the difference is that margin inserts the space around the border, while padding inserts the space within the border of an element.
The padding property sets or returns the padding of an element.
One value, like: div {padding: 50px} - all four sides will have a padding of 50px
Two values, like: div {padding: 50px 10px} - the top and bottom padding will be 50px, left and right padding will be 10px
Three values, like: div {padding: 50px 10px 20px} - the top padding will be 50px, left and right padding will be 10px, bottom padding will be 20px
Four values, like: div {padding: 50px 10px 20px 30px} - the top padding will be 50px, right padding will be 10px, bottom padding will be 20px, left padding will be 30px