A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: need help with background

  1. #1
    Senior Member
    Join Date
    May 2005
    Location
    Canada
    Posts
    212

    need help with background

    im creating a site with flash and dreamweaver. im having a problem with setting an image background in dreamweaver, i insert it and it doesnt fit perfect. i dont want it to repeat i want it to stretch to fit, how do i do this?

  2. #2
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    I don't think there is a way to make it stretch. You can tile it or insert one image, as far as I know.

  3. #3
    Junior Member
    Join Date
    May 2006
    Posts
    21
    Try something like this

    <BODY BACKGROUND="image.gif" BGPROPERTIES="fixed" >

    This will make the image a static background so that it doesn't tile.
    I don't think the image stretches though.

  4. #4
    Member
    Join Date
    Aug 2005
    Posts
    42
    Not sure there is a way to stretch it either...CSS wuold probably be your best bet --

    CSS Backgrounds

  5. #5
    Member
    Join Date
    Jan 2006
    Posts
    55
    Try

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <!-- leave DTD out of DOCTYPE to put IE6 in quirks mode -->
    <html>
    <head>
    <title>BG</title>
    <style type="text/css">
    body {
    /* for IE; otherwise, BG isn't fully stretched */
    margin: 0px;
    }

    #bg {
    position: fixed;
    margin: 0px;
    border: 0px;
    padding: 0px;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    }

    #bg img {
    width: 100%;
    }


    #body {
    position: absolute;
    left: 0%;
    top: 0%;
    width: 98%;
    height:98%;
    padding: 1%;
    z-index: 10;
    }

    li {
    margin-bottom: 2em;
    }
    </style>
    <!--[if IE]>
    <style type="text/css">
    body {
    margin: 0px;
    overflow: hidden;
    }

    #body {
    padding: 1em;
    width: 100%;
    height:100%;
    overflow: auto;
    }
    </style>
    <![endif]-->
    </head>

    <body>
    <!-- img must be encased in div to keep proper image aspect ratio -->
    <div id="bg"><img src="images/background"></div>

    <div id="body">Put the page's content here.</div>
    </body>
    </html>
    .-Pain is weakness leaving the body-.

  6. #6
    Senior Member
    Join Date
    May 2005
    Location
    Canada
    Posts
    212
    that worked, thanks alot man

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center