1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Background ReSize Code?

Discussion in 'Web Design & Development' started by DammitJanet, Jan 25, 2007.

Thread Status:
Not open for further replies.
  1. DammitJanet

    DammitJanet Thread Starter

    Joined:
    Apr 14, 2006
    Messages:
    98
    I need the code (CSS or HTML) that makes a background image re-size automatically to fit a given resolution. For example, I have a background picture with two triangles on my blog. For me, the blog slides right up between the triangles because my resolution is 1680x1050, like the picture. However, everyone using a resolution smaller than that finds it hard to read, because it won't re-size for them. Can someone PLEASE tell me this code?! I'm dying over here!
     
  2. apr911

    apr911

    Joined:
    Jan 25, 2007
    Messages:
    75
    Have you tried using percentages to define height and width of the image? That is how most sites do resizing, this will actually resize based on the browser size/resolution and not the resolution of the computer so even on your computer, the image will appear smaller and more centered as I would imagine your active browser window viewing space is slightly smaller than the full 1680x1050 resolution do to start menu, title bar, address bar, scroll bar, etc...

    I believe the HTML code would look something like this (my HTML is rusty so i could be wrong)

    <img src="filename.extension" height="100%" width="100%" />

    Of course, keep in mind your image at 1680x1050 is in a widescreen resolution and will looked squished horizontally on most peoples monitors since most dont own a wide screen 16:10/16:9 monitor but the more standard 4:3 monitors with 800x600 and 1024x768 resolution or 5:4 montior at 1280x1024.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/538431

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice