Tutorial: CSS Background Image

Tutorials | CSS Spacing | CSS Bacground Image | CSS Links

  1. To repeat an image in the background of a page down the left side using CSS, use the following code, changing the folder and image name to yours (shown in brown). Place it in the head section of your code.

    <style type="text/css">
    body
    {
    background-image:
    url('images/crowneds.jpg');
    background-repeat: repeat-y
    }
    </style>



  2. To repeat the image across the top change the y value to x

    <style type="text/css">
    body
    {
    background-image:
    url('images/crowneds.jpg');
    background-repeat: repeat-x
    }
    </style>





© J. K. Phillips     Disclaimer
Current URL: