View Full Version : Keeping my background still
wpb30635
Mar 20, 2003, 11:24 PM
Can anyone tell me if there is a way to keep the background on my webpage from scrolling with the text? I have an image I'd like to use and have the test scroll over it. I'm farely new to HTML so be thorough.
Thanks
coreybryant
Mar 21, 2003, 09:00 PM
You can add this to the opening body statement:
<body bgproperties="fixed" background="images/background.gif">
Bgproperties="fixed" is one way to do it. You can also use a style sheet - you place this before the </head>:
<style type="text/css">
BODY
{
Background: white url('images/background.gif') fixed;
}
</style>
And if you want ths image only once & not tiled:
BODY
{
Background: white url('images/backgrounds/generichdr.gif') fixed no-repeat;
}
</style>
Corey
wpb30635
Mar 22, 2003, 12:39 AM
Thank you
badkarma
Mar 25, 2003, 10:45 AM
Great info Corey, thanks
badkarma
Apr 1, 2003, 02:12 PM
What can you do to keep a background image from tiling?
coreybryant
Apr 1, 2003, 02:14 PM
You can use this:
<style type="text/css">
BODY
CF_Master
Jul 22, 2003, 11:54 PM
Keep in mind this will only work with Microsofts Internet Explorer browser.
triconanz
Sep 11, 2003, 10:05 PM
Yes!
But is there also a way to do this same thing within a table?
If I want to insert an image in the background of a table and also want only the text to move but not the image... is there a way to do this?
Or would it be something that would have to be done using frames?
coreybryant
Sep 12, 2003, 05:23 AM
Actually it will work in Netscape 6.2 - I did test it on my browser. You can also review here: http://www.blooberry.com/indexdot/css/supportkey/colorbg.htm
In repsonse to triconanz question, there are a couple of ways:
<html>
<head>
<style type="text/css">
.tbl1
{
Background: url('images/back.gif');
Background-repeat: no-repeat;
}
</style>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" width="100%" class="tbl1">
<tr>
<td width="100%"> </td>
</tr>
</table>
</body>
</html>
Is one. You can also use absolute positioning as well.
bugsmeda
Nov 3, 2011, 03:04 AM
Once a background is inserted into a page body add bgproperties="fixed", to make the page background fixed.