Можно ли через css файл прописывать параметры <body>??

Bboy

Новичок
Можно ли через css файл прописывать параметры <body>??

Можно ли через css файл прописывать параметры <body>??
Мне надо указать в css файле параметры, к-ые в html пишутся так:
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" background="img\bg.gif">

???
 

Bocha

Guest
'margin'
Value: <margin-width>{1,4} | inherit
Initial: see individual properties
Applies to: all elements
Inherited: no
Percentages: refer to width of containing block
Media: visual
Computed value: see individual properties

The 'margin' property is a shorthand property for setting 'margin-top', 'margin-right', 'margin-bottom', and 'margin-left' at the same place in the style sheet.

If there is only one value, it applies to all sides. If there are two values, the top and bottom margins are set to the first value and the right and left margins are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values, they apply to the top, right, bottom, and left, respectively.

Example(s):

body { margin: 2em } /* all margins set to 2em */
body { margin: 1em 2em } /* top & bottom = 1em, right & left = 2em */
body { margin: 1em 2em 3em } /* top=1em, right=2em, bottom=3em, left=2em */

The last rule of the example above is equivalent to the example below:

body {
margin-top: 1em;
margin-right: 2em;
margin-bottom: 3em;
margin-left: 2em; /* copied from opposite side (right) */
}
 

Bocha

Guest
'background-image'
Value: <uri> | none | inherit
Initial: none
Applies to: all elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: absolute URI

This property sets the background image of an element. When setting a background image, authors should also specify a background color that will be used when the image is unavailable. When the image is available, it is rendered on top of the background color. (Thus, the color is visible in the transparent parts of the image).

Values for this property are either <uri>, to specify the image, or 'none', when no image is used.

Example(s):

body { background-image: url("marble.png") }
 
Сверху