64 users online (1 members and 63 guests)  


  Results 1 to 4 of 4

Related

  1. can't reset frame size    Forum: HTML Forum
    Replies: 0
  2. Is it the resolution, or a Stretch??    Forum: Web Hosting Forum
    Replies: 2
  3. Frame Size?    Forum: HTML Forum
    Replies: 9
  1. #1
    ShullDip's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2003
    Location
    San Antonio, Tx
    Posts
    2

    Stretch BG IMG to meet a frame's size?

    I'm working on my very first page, so im getting snagged quite often. This time i thought I'd get some advice from the pros.

    I have a frame row located at the top of the page. It's purpose is to hold my banner image in place. I'd like to make the image size itself to fill the entire frame so as to prevent losing the end of the image in lower resolutions. Right now i just created the image as the exact size of the frame, as seen with my resolution, and used 'background-image' to display it. Far from clean, so thats why I'm here.

    I remember coming across a "maximum" and "minimum" size attribute, but don't know how to use it. It would be great if the image would stretch/shrink to a certain degree, but then have scrolls when it's been reduced to a specified minimum percentage.

  2. #2
    ShullDip's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2003
    Location
    San Antonio, Tx
    Posts
    2
    well, I tried using the 'img src=' with "0" border and setting each dimention set to 100%, this works, but it doesn't fill the entire frame, but rather leaves void around it. Now im even more confused.

  3. #3
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    It could be that the body of the framed page has a margin/padding, try adding this in your head -

    Code:
    body
    {
    margin: 0px;
    padding: 0px;
    }
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  4. #4
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440
    I can do it with this
    HTML Code:
    <html>
    <head>
    </head>
    <body>
    <table width="100%" border="1px">
    <tr><td width="100%" align="center">
    <img src="IMAGE.HERE" width="100%" height="200px"></td>
    </tr>
    </table>
    </body>
    </html>
    you could adjust and adapt it for you're purposes; however, I would caution about combining percentages and absolute values for images. In fact, I don't think it's even valid html (and alot of folks are probably cursing me for even suggesting it!) I don't think some browsers like it. I don't think I would use it just for the fact that in stretching an image it distorts severely.
    Good exercise to play with though



Tags for this Thread