Home >> Tutorials/FAQs >> CSS Tutorials >> Index

CSS Tutorials - Positioning Background Images

By: FYICenter.com

(Continued from previous topic...)

How To Position Background Images?

In the previous exercise, the background image is repeated on the entire background area of the DIV tag. If you want to have one copy of the image at the bottom right corner, you need to use background-repeat and background-position properties as shown in the CSS code below:

<style type="text/css">
  BODY {background-color: gray; color: white}
  DIV.page {background-image: url(follow.jpg); 
    background-color: blue;
    background-repeat: no-repeat;
    background-position: bottom right;
    width: 730px;  padding: 25px; text-align: left}
  HR {width: 730px}
  P {width: 730px; font-size: 28px}
  H1 {font-size: 32px}
</head><body><center><div class="page">
<img src=fyi_banner_blended.jpg width=728 width=90>
<H1>Background Image at Bottom Right Corner</H1>
<hr align=left>
<p><script language="JavaScript">
  for (i=0; i<10; i++) {
    for (j=0; j<24; j++) {
      document.write(j+' ');
<p align="right">By FYICenter.com</p>

If you view this document, you will see the image is positioned nicely at the bottom right corner of the page:

(Continued on next topic...)

  1. What Needs To Be Considered When Designing Page Layout?
  2. What Is Screen Resolution?
  3. What Is Browser Resolution?
  4. How To Test Browser Resolutions?
  5. How Wide Do You Want Your Page Content to Be?
  6. What Are the Page Widths on Popular Websites?
  7. What Are the Length Units Used in CSS?
  8. How To Set Page Width Relative To the Browser Width?
  9. How To Set Page Width to a Fixed Value?
  10. How To Center Your Page in Browser Windows?
  11. What Happen to Images with Absolute Page Width Units?
  12. How To Set Page Widths to Relative Length Units?
  13. What Happen to Font Sizes with Relative Page Width Units?
  14. How To Set Font Sizes to Relative Length Units?
  15. What Are the Background Style Properties?
  16. How To Specify a Background Image?
  17. How To Position Background Images?
  18. How To Specify Two Background Images on a Page?

Selected Developer Jobs: