|
-
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?
-
Registered User
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.
-
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.
-
Not sure there is a way to stretch it either...CSS wuold probably be your best bet --
CSS Backgrounds
-
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-.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|