Home » questions » html code for resizing a bg image?

html code for resizing a bg image?

2006-08-07 13:28:29, Category: Programming & Design
can someone please take a look at the code on my page - http://myspace.com/fonix_werx - and let me know how I can resize my image so that it takes up 100% of any browsers window? Thanks in advance

Answers

  1. Stepheni U

    On 2006-08-07 13:56:42


    One thing I noticied about your background picture is that it is small. If you blow up that picture it will become distorted due to pixelation. JPG format pictures do that when you are trying to blow them up bigger then the original size. I would suggest trying to obtian the same image at a much larger original size, like 1024 x 768 pixels. Also make sure to optimize this larger picture for the web. Surfers hate waiting for a giant picture to download into their browsers. On a last note try inserting into your html sourse code to get a tiled effect of your image. If you find a large enough picture at 1024 x 768 pixels you can also freeze the background by inserting . Any further questions refer to http://www.w3schools.com.
  2. cdg1111us

    On 2006-08-07 13:48:13


    Just save the image in a larger size. You can't query for the user's browser size & have it be 100% all the time for all people, you just have to guesstimate it by sizing it for what you think most of your users will use (about 650-950 pixels).
  3. John J

    On 2006-08-07 13:35:46


    I don't believe that you can do that. You can do one of two things. Create a background image that can repeat side to side and look continuous, or create one for a window size (usually for 800x600, so 765px - 780px) and center it. for more information on background controls see http://www.w3schools.com/css/css_reference.asp