CSS makes using backgrounds a delight, because everything can now have a background! Take a look:
| This is a bit of text with a repeating image for a background. |
And this is a paragraph with a background image. You get the idea. |
<style type="text/css"><!--
body {background-image:url(background.gif);
background-repeat:no-repeat}
--></style>
Above, "background.gif" will not repeat, only displaying once. You could also put "repeat-x" to repeat it horizontally, or "repeat-y" to repeat it vertically. Of course, if you want more precision, you can position it yourself:
<style type="text/css"><!--
body {background-image:url(background.gif);
background-repeat:no-repeat;
background-position:300px 100px}
--></style>
Here, "background.gif" is displayed in the background of the page once, 300 pixels from the left of the screen and 100 pixels from the top. You can also enter percentages, such as {background-position:50% 50%}, or directions, such as {background-position:top center}.Can't find what you're looking for? Try searching for it:
© 2000-2008 Xentrik.Net