how do you make your background image automatically resize itself to fit any screen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MusoFreak200
    New Member
    • Oct 2009
    • 96

    how do you make your background image automatically resize itself to fit any screen

    hello

    i am creating a website for both my school assignment and to really upload.

    could someone help me with the following question, please?

    how do you make your background image automatically resize itself to fit any screen without having extra scrollbars and having the image stay fixed and the words just move?

    any help would be appreciated.

    TY
    MusoFreak200
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Originally posted by MusoFreak200
    how do you make your background image automatically resize itself to fit any screen without having extra scrollbars
    not at all (afaik), although you might use a repeating pattern or an image, that blends into background.

    … and background images do not cause scrollbars.

    alternatively, instead of using the CSS background, you can make a real image as a kind of background, although it may break the layout or provide other trouble.

    Originally posted by MusoFreak200
    and having the image stay fixed and the words just move?
    CSS backgrounds
    Code:
    background-position: fixed;
    HTML Elements
    Code:
    position: fixed;
    (not (partly?) implemented in IE)

    Comment

    • MusoFreak200
      New Member
      • Oct 2009
      • 96

      #3
      thank you so much...

      but i still am having trouble understanding.. . where exactly do i add the "background-position: fixed;" code?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by MusoFreak200
        where exactly do i add the "background-position: fixed;" code?
        to the CSS declaration of the element, that holds the background-image (theoretically you can add it everywhere, beside that’s making no sense at all)

        Comment

        • MusoFreak200
          New Member
          • Oct 2009
          • 96

          #5
          i don't understand so do i add it in the body... or the head... or where?

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            er, do you know how to apply a background in CSS?

            Comment

            • MusoFreak200
              New Member
              • Oct 2009
              • 96

              #7
              no only html... sorry i still learning in class but my teacher didn't know how...

              its for an assignment

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #8
                Originally posted by MusoFreak200
                but my teacher didn't know how...
                eh?! what kind of teacher is that?

                Comment

                • Dormilich
                  Recognized Expert Expert
                  • Aug 2008
                  • 8694

                  #9
                  Originally posted by MusoFreak200
                  no only html... sorry i still learning in class
                  check out http://www.w3schools.com there are a lot of tutorials.

                  Comment

                  • MusoFreak200
                    New Member
                    • Oct 2009
                    • 96

                    #10
                    high school...

                    anyway back to the code...

                    Comment

                    Working...