CodeAve.com CodeAve.com - CSS - Page Display
ASP
JavaScript
CSS
·Basics
·Page Display
·Text Display
·Script Writers
·Contents
·What's New?
HTML
Maps
Links
Mail List
Search
Sitemap


 


Background Image (No Repeat)
CSS background images work very similar to the background command in html. When applied within the <body> tag it will the image will, by default, repeat and fill the entire page. This may seem redundant to the background tag, however since the background tag is typically applied to each page and CSS are usually linked throughout a site, you can easily in one place, change the backgrounds to many pages similar to what Yahoo.com did recently for breast cancer awareness or what Excite.com seems to do every Halloween.  Utilizing background-repeat: no-repeat; will only display the image one time overriding the default repeat setting.
View the Output
Text View
Print View
Mail this Link
Download the Code

<html>
<head>
<title>CodeAve.com/CSS - Body Background Image - No Repeat</title>
<style type="text/css">
<!--
body {background-image: url(images/bg1.gif); background-repeat: no-repeat;}
/* Setting the body tag with a background-image attribute
set to background-repeat: no-repeat; will only display the image one time 
(repeat is the default setting) */
-->
</style>

</head>

<body>
<center>
The background of this page has been set to an image
style command set for the body tag, this is more impressive
with a larger image

</center>
</body>
</html>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
Maps: Map Script Writers | Bing Maps | Google Maps
Privacy Statement

CodeAve.com is hosted by MyHosting.com
Donate Food Online with a Mouse Click at TheHungerSite.com
Donate Land Online with a Mouse Click at TheRainForestSite.com
© 1999 - 2014 CodeAve.com
All Rights Reserved