Web Analytics Made Easy -
StatCounter css background image - CodingForum

Announcement

Collapse
No announcement yet.

css background image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • css background image

    If I made a background image of like 400 x 500 pixels, can css use just one image (not tiled) and pull it to a 800 X 600 pixel screen? just strech it out to a larger image to fit the brower?
    Rowsdower! has accused me of having mental problems, and the administrator allowed it. What a great forum huh?

  • #2
    you can't do that
    Master Newbie http://dwightstegall.com/

    Comment


    • #3
      Nope, as said, CSS can't stretch an image.

      Only solution really is to place in a table (please don't do it!), the image, then use percentages to scale it down.
      markaylward.co.uk

      Comment


      • #4
        For people who have had similar questions like yours I have told them to do this. Make the background image centered, and make the background color match a dominant color in the background image.
        Code:
        <style type="text/css">
        body {
        background:#000000 url(yourimage.jpg) no-repeat fixed center;
        }
        /*the hex value above should match a dominant color in your background image*/
        </style>
        That goes in your head tags. It will look like the image is expanding but it really isn't.
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment

        Working...
        X