2 Replies Latest reply on Jan 14, 2009 9:33 AM by ksb43

    How Do I create A css tag that sets my bg?

    dsterlinjustin
      I created a css tag that defines my bg and how it is displayed but I have no clue on how to apply it to my pg...or if I have done this the right way. If someone could provide a tutorial or instruction that would be greatly appreciated.

      Thank you
        • 1. Re: How Do I create A css tag that sets my bg?
          Level 7
          dsterlinjustin wrote:
          > I created a css tag that defines my bg and how it is displayed but I have no
          > clue on how to apply it to my pg...or if I have done this the right way. If
          > someone could provide a tutorial or instruction that would be greatly
          > appreciated.
          >
          > Thank you
          >

          If you want the background image to be displayed behind the rest of the
          content on your page you have to set it on the 'body' tag.

          body {
          background-image: url(yourimagename.jpg);
          background-repeat: no-repeat;
          background position: top center;
          }
          • 2. Re: How Do I create A css tag that sets my bg?
            ksb43
            You can apply it to the body tag, or create a div tag with an id (ie id="container") that surrounds the page and apply it to that.

            body {
            background: #333333;
            }
            #container {
            background: #333333;
            }

            Go to Window > Reference
            In the Book dropdown choose CSS under style select any of the background attributes to see details about how to use it.

            Put your styles in a new stylesheet, embedded on the page, or inline.

            -To link a separate style sheet put this in the head:
            <link href="pathtostyles/filename.css" rel="stylesheet" type="text/css" />

            -To embed it on the page place the css code in the head surrounded by style tags:
            <style type="text/css">
            body {
            background: #333333;
            }
            </style>

            -To use inline styles, in the html tag use the style attribute:
            <body style="background: #333333;">