div {
padding-top: 50px;
padding-right: 30px;
padding-bottom: 50px;
padding-left: 80px;
}
/* You can also write above code in one line */
div{
padding: 50px 30px 50px 80px; /* top right bottom left; (moving clockwise) */
}
padding: 5px 10px 15px 20px; //top right bottom left
padding: 10px 20px;//top & bottom then left & right
padding-top: 5px; //just top padding
padding-right: 10px; //just right padding
padding-bottom: 15px; //just bottom padding
padding-left: 20px; //just left padding
padding-top: 25px;
/* Apply to all four sides */
padding: 1em;
/* vertical | horizontal */
padding: 5% 10%;
/* top | horizontal | bottom */
padding: 1em 2em 2em;
/* top | right | bottom | left */
padding: 5px 1em 0 2em;
/* Global values */
padding: inherit;
padding: initial;
padding: revert;
padding: revert-layer;
padding: unset;
padding-block: 40px 40px;
/*This works for padding topm and bottom*/
padding: 1%; // scales proportionally - on ALL sides
padding: 5px 10px 15px; //top then left & right then bottom
Code Example |
---|
Css :: |
Css :: how to change image based on screen size |
Css :: #f2f2f2 in rgba |
Css :: css dropdown menu with scrollbar |
Css :: cssnano |
Css :: css animation top goes back to start |
Css :: curve bottom of square css |
Css :: css align-items center |
Css :: box model css |
Css :: jquery hide scrollbar but allow scrolling |
Css :: maxheight media query |
Css :: css get screen height |
Css :: css for safari only |
Css :: flex direction tailwind |
Css :: getting two scroll bars |
Css :: linear gradient border |
Css :: object-position |
:: |
:: |
Css :: media query for mobile min and max width both |
Css :: css triangle |
Css :: select third element of an id css |
Css :: flexbox navbar fixed top |
Css :: how to make div scrollable horizontal |
Css :: react bootstrap carousel not working |
Css :: overflow css |
Css :: css font variant small caps |
Css :: bulma uppercase |
Css :: font family css |
Css :: CSS Text Shadow Effect( cool) |