значения свойства:
* {
margin
:
0
;
padding
}
.
inside
{
width
300px
height
50px
background-color
#7092BE
.a, #div
1
, .b {
900px
100px
10px
auto
border
1px
solid
#808080
.a {
20px
30px
* { margin: 0; padding: 0; } .inside { width: 300px; height: 50px; background-color: #7092BE; } .a, #div1, .b { width: 900px; height: 100px; margin: 10px auto; border: 1px solid #808080; } .a { padding: 20px 0 0 30px; }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
link
href
"css/style.css"
rel
"stylesheet"
script
type
"text/javascript"
src
"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
></
</
body
div
class
"a"
"inside"
id
"div1"
"b"
/*JavaScript*/
document.getElementById("div1").style.padding = "10px 20px 15px";
/*jQuery*/
$(document).ready(function () {
$(".b").css({ "padding": "20px" });
});