allows the developer to find a starter location for bg elements.
firstly insert the bg image with the body element
body {
background-image:url(image);
background-position:center; background-position:left-top;background-position:bottom;background-position:center center;
background-repeat:no repeat
}
default image is to tile, centering will tile down the screen
the no repeat will align the bg to the centre of the page.
can also do exact co-ordinates. in either ems, or %
background-position:300px 150px; 1st value how far from the left and 2nd value is from the top of the browser.
background-position:40% 20%;relative to the size of browser winder
background-position:center center;
where bg image comes in handy, is when you are creating something like a menu system,
we can use bg image as a button.
in body tag
index
now a rule for a tag
a {
background-image:url(pat2.jpg);
}
the hyperlink will have bg image
Tuesday, July 28, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment