Graphics Programs Reference
In-Depth Information
You can of course do something very similar with repeating background images (see Figure
3-26).
html
{
background
:
url(stars-m.png)
14px
41px
repeat-y
;}
body
{
background
:
url(stars-k.png)
54px
-20px
repeat-x
;}
img.logo
{
position
:
absolute
;
top
:
10px
;
left
:
10px
;}
103
Figure 3-26: Many stars.
DOCUMENT BACKGROUNDS
We're all used to setting a
background
on the
body
and having it i ll the whole browser
window. But guess what happens if you also set a
background
for the
html
element?
html
{
background
:
#ABACAB
;}
body
{
background
:
#DED
;}
Yep: As evident in Figure 3-27, the browser window is i lled out by the
html
element's
background, and the
body
's background just i lls in the content area and padding of that
specii c element. h is is true whether or not the
body
element is tall enough for its bottom to
reach the bottom of the browser window. If it doesn't, then the
html
background is visible
underneath. h is would also be the case if the
body
element has a bottom margin, the
html
element has bottom padding, or both.

























Search WWH ::

Custom Search