margin

+2 Jeff the Killer · August 9, 2015
let's say
body{margin:1px 2px 3px 4px;}
how do I know which is top, bottom, left or right...?

Post a Reply

Replies

Oldest  Newest  Rating
+1 Terry Horsman · August 19, 2015
Think of it like a clock. Start at the top and go clockwise. 
+1 Terry Horsman · August 19, 2015
Just think of it like a clock and go clockwise. Top, right, bottom,  left. 
0 Lachezar Peshterliev · August 11, 2015
in CSS file:
body{
margin-left:20px;
margin-right:40px;
margin-top:20px;
margin-bottom:20px;
}
That is :) It is very sipmle !
0 nmelssx nmelssx · August 11, 2015
<style>

body {
margin-left: 5px;
margin-right: 5px;
margin-top: 5px;
margin-bottom: 5px;
}

</style>

Like that ^^^
0 Jeff the Killer · August 9, 2015
sorry it was about margin and padding(i got confused for a while) thanks anyway
+1 wernich wilsenach · August 9, 2015
border takes input as:
<width> || <style> || <color>

(http://devdocs.io/css/border)
#loginButton {
border: 1px solid pink;
}



are you perhaps thinking about margin or padding?

(http://devdocs.io/css/padding)

padding: 5%;
/* on all sides 5% padding */

padding: 10px;
/* on all sides 10px padding */

padding: 10px 20px;
/* top and bottom 10px padding */
/* left and right 20px padding */

padding: 10px 3% 20px;
/* top 10px padding */
/* left and right 3% padding */
/* bottom 20px padding */

padding: 1em 3px 30px 5px;
/* top 1em padding */
/* right 3px padding */
/* bottom 30px padding */
/* left 5px padding */
  • 1

HTML / CSS / Web Design

107,309 followers
About

Discuss, share, ask, learn and teach HTML5 and CSS3.

Links
Moderators