html help

Status
Not open for further replies.

QRob001

Member
6
2010
0
0
Hello and thanks in advance for any and all help.

Ok what I want to do if its possible is to have my web page, including background to size according to the viewers resolution fixed in place while also being able to scroll down the page of text etc. I have been able to size the background but it wont stay fixed, it scrolls with the rest. Or I have been able to fix the background and have scrolling abuility but the background and page do not resize to viewing resolution.

Any ideas or help would be greatly appreciated.
 
5 comments
try this:
Code:
<style>
body 
{
background-image:url('yourbackground.gif');
background-repeat:no-repeat;
background-attachment:fixed;
}
</style>
 
Ok this is what I have that allows the background to resize to the viewing resolution
Code:
<div>
<body bgcolor="#000000"  text="#FFFFFF">
<img src="tropicalbeach.jpg" class="world" bgproperties="fixed" text="white">
</div>
<style type="text/css">
.world {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -5000;
}
</style>
Is there a way to modify this to resize the whole web page? Banners, button menues ect while allowing the viewer to scroll down text?
 
Did you try the code below?
Code:
<head>
<style>
body 
{
background-image:url('tropicalbeach.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
}
</style>
</head>
<body>
your html code
</body>
 
For the text, you need to use "em" instead of "px", but as for the banner.. . I don't know if this is the ideal method, but you can try and make every button and banner as a background image.

Code:
<a id="banner" href="http://*********"></a>

Code:
#banner {
width: 75%; /*of course use the height and width that matches what you need*/
height 10%;
background-image:url('banner-img.gif');
background-size:contain;
 
Status
Not open for further replies.
Back
Top