Menu

Background image

Help
2003-06-22
2003-06-23
  • Andrea Powell

    Andrea Powell - 2003-06-22

    I'm having problems using an image as the body background.  This is what I have in the css:

    BODY {
        background-image: url('background.gif');
        font-size: 12px }

    and the background.gif is in the same directory.  What am I missing?

     
    • John Finlay

      John Finlay - 2003-06-23

      Andrea,

      It worked for me.  Here is what the first 10 lines of my style.css looked like:

      /* Use this stylesheet to customize the display of your site.
      To learn more about CSS visit http://www.w3.org/TR/REC-CSS2/
      */
      BODY {
          COLOR: #000000;
          background-color: white;
          background-image: url('header.png');
          font-family: times, times new roman, serif;
          font-size: 12px; }

      header.png is in the themes/standard/ directory.

      Everything looks fine in the body style you have above.  Your syntax is correct.

      --John

       
    • Mark Hattam

      Mark Hattam - 2003-06-23

      Perhaps the semi-colon after the 12px of font-size.

      Mark

       
    • John Finlay

      John Finlay - 2003-06-23

      It is a common practice to leave off the semi-colon after the last item of a style-sheet.  It doesn't seem to make a difference either way and should work without it.  But my personal preference is to include it.  Probably mostly because of my programming habits--a line without a semi-colon just seems incomplete to me :-)

      --John

       

Log in to post a comment.