Frontpage web page size settings?

G

Guest

Is there a way to set the width of a web page so that no matter what browser
it shows in, It will stay centered and be of a certain(small size)size?
I do not see any width setting in MS frontpage 2003....am I missing it?
I am having trouble because I have a background image inserted and it
repeats after it reaches its perimiters and I would like the page just to end
at the end of the background graphic but I can't find any page width settings.
I know how to use tables to keep the width size down, but the graphic keeps
repeating if I make the browser bigger.
I would like the page just to sit in the middle of the browser without
repeating itself and filling up the whole browser.
Bottom line...can I have a background picture on a web page and not have it
repeat and fill up the entire web page(in a browser)?

Thanks!
 
T

Trevor L.

GaryR said:
Is there a way to set the width of a web page so that no matter what
browser it shows in, It will stay centered and be of a certain(small
size)size?
Bottom line...can I have a background picture on a web page and not
have it repeat and fill up the entire web page(in a browser)?

To stop repeat use this CSS
body
{
background-image: url("images/xxxx.jpg");
background-repeat: no-repeat;
}

To set the width, you can certainly change the style to:
body
{
background-image: url("images/xxxx.jpg");
background-repeat: no-repeat;
width:800px;
}

But if the image is less than 800px, I am not sure how it will fit, but it
won't repeat

P.S. I just tried it and it positioned at top left. The light green
background took up the rest of the space.

My screen setting is 1024*768.
My image is 800*600
My code was
<html>
<head>
<style type="text/css">
body {
width: 800px;
background-color: #aaddaa;/* a light greeen */
background-image: url("images/display/04-08-24-1-bird-bath.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
font-family: verdana,arial,helvetica,sans-serif;
text-align: left;
padding: 0;
margin: 0 auto;
}
</style>
</head>
<body>
any text here
</body>
</html>

Now all you have to do is find out how to centre it
 
M

Murray

The document size depends on the client browser screen resolution, which
can be detected.

No, it doesn't. The document size (in a flexible document) depends on the
browser viewport width, which has no direct relationship to screen
resolution. All screen resolution does is to set a maximum practical width
to your viewport (i.e., you cannot practically make the viewport wider than
the screen). As a result, trying to detect the resolution will tell you
nothing about the actual browser viewport width....

Trying to build a page that relies on such marginally useful scripting is
wasted effort in my opinion.
 
D

Dennis D.

You are right Murray:

OOps;

Here's a JavaScript snippet:

function openhome() {
var hw
var fname
hw=screen.width
if (hw < 770) {
fname = "/firstindex.htm"
} else {
fname = "/secondindex.htm"
}top.location.href = fname
}

I used the screen.width to choose between loading a page named
firstindex.htm and a page named secondindex.htm
 
M

Murray

That's a sure way to miss the boat. Not only have you doubled your work now
by having to maintain both pages, but you are also trying to shut the barn
door after the horse has gone. Just make your pages flexible and let it go
at that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top