top left
The HTML Source Logo


 html
Top Right
    
 Getting StartedHow Do I...TroubleShootingPromotionContact Us
 html
HTML
SEARCH THE SITE
advanced search



CATEGORIES
Home
Getting Started
HTML Cheat Sheet
Webmaster Tools
HTML Help Forum
Color Codes
Link to us









































bottom
HTML HTML HTML HTML
How do I stop a background image from tiling?


This will stop your background image from tiling across the entire background of your web page, instead your background image will appear only once.

How to do it...

To stop your background image from tiling, you have to add a little CSS (Cascading style sheets) to your web page.

Place the following code somewhere in between your <HEAD> and </HEAD> tags.

<STYLE TYPE="text/css">
<!--
BODY {background-color: #FFFFFF; background-image: url(your image name.gif); background-repeat: no-repeat;background-position: 0% 0%}
-->
</STYLE>


Now replace the background color (#FFFFFF) to the color code of the color you want your background to be. If you don't know what the color code is of the color that you want, CLICK HERE to see all the colors and there color codes.

Next, replace your file name.gif with the actual address of the image you want to use for your background.

Finally, change the 0% 0% to where you want the background image to be placed. The first percentage is for your horizontal alignment, and the second percentage is for your vertical alignment.

For example, if you wanted your background to be in the top center of your web page, you would use 50% 0%, if you want the image to be in the dead center of your web page, you would use 50% 50%.

Leaving it at 0% 0% will place the image in the top left hand corner of your page.
















< BACK







Company   |   Careers   |   Partners   |   Advertising   |   Help
Privacy Policy   |   Trademark Notices   |   User Agreement
2001 TheHTMlSource.com, INC. All Rights Reserved.



Site hosted by Angelfire.com: Build your free website today!