Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making image 100% of frame?

    It has been a while since I wrote any html. Im not sure why but I can't get my menu image to take up 100% of my left frame in my html document. There is a black border around it that is permanent. If you resize the ie window the image resizes with the black border. My code is:

    <img src="menu2.gif" width="100%" height="100% "border="0" hspace="0" vspace="0">

    Does this have something to do with Dreameweaver? any help is appreciated

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    More input!

    Without seeing the rest of the code, I can't really put a finger on it; what I can say straight away is that having the browser resize an image will often yield... erm, unexpected results. Reducing the size should be ok, unless it's by a small amount, but enlarging will quickly deteriorate image quality.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New Coder
    Join Date
    Nov 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The code for my frameset:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <title>Mobile Tranquility</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <frameset rows="*" cols="170,470" framespacing="0" frameborder="1" border="0">
    <frame src="topFrame2.htm" name="topFrame" scrolling="NO" noresize >
    <frame src="mainFrame.htm" name="mainFrame" scrolling="auto" noresize>
    </frameset>
    <noframes><body>

    </body></noframes>
    </html>

    and my topFrame (where the image is located ):


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Mobile Tranquility</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="tranq.css">
    </head>
    <body bgcolor="#000000">
    <img src="menunew.gif" width="100%" height="100%" vspace="0" hspace="0">
    </body>
    </html>

    Thanks for the reply

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Well, that was easy...

    Code:
    <body bgcolor="#000000">
    You've made your body background color black (!), and body by default gets a margin of a couple of pixels, so the black border you see actually is the black background showing through.

    It's advised to use CSS for presentation aspects anyway, so ditch the bgcolor attribute and define a style, either included or in a seperate style sheet (preferred):
    Code:
    body {background-color: #000;
          margin: 0;
         }
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    New Coder
    Join Date
    Nov 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for your help. I was planning on using css for the bgcolor in the end, but I was being lazy while trying to figure out my menu. I didn't realize that body got a default margain. Thanks again


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •