Opening a web page in the centre in a browser.

B

Bundy

I have created a web page for a 1024x768 display.

The web pages have a left and right coloumn which are not important. The
important content is in the centre.

So I was wondering if it was possible for visitors with lower resoultion
of say 800x600 to have the wep page opened centred in the browser?

Your help will be appreciated.

Regards


Bundy
 
D

David Dorward

Bundy said:
I have created a web page for a 1024x768 display.

Oh dear.
So I was wondering if it was possible for visitors with lower resoultion
of say 800x600 to have the wep page opened centred in the browser?

I don't think I've ever seen a page that has horizontal scrolling and didn't
default to the far left.
 
S

Spartanicus

David Dorward said:
I don't think I've ever seen a page that has horizontal scrolling and didn't
default to the far left.

Just for fun: <body dir="rtl"> produces a "right aligned" hor scrollbar
in IE and Opera.
 
B

Blinky the Shark

Bundy said:
Thanks but it does not centre the page when opened in a broswer by a
visitor with a lower screen resolution. I have tried it in IE7 and FF 2.

Perhaps you should consider a non-fixed-size construcation.
 
J

Jonathan N. Little

Bundy said:
Thanks but it does not centre the page when opened in a broswer by a
visitor with a lower screen resolution. I have tried it in IE7 and FF 2.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Centered block</title>

<style type="text/css">
.demofixed { color: white;
background-color: red;
width: 600px;
position: absolute;
left: 50%;
margin-left: -300px;

}

</style>

</head>
<body>
<div class="demofixed">
This is a fix width centered block. I am <strong>not</strong>
advocating that one should do this, only that it can be done.
</div>
</body>
</html>
 
B

Bundy

Perhaps you should consider a non-fixed-size construcation.

Something to consider since I do not think it is possible for a web page
to be opened centred in a browser.

Regards

Bundy
 
B

Bundy

Thanks but I am trying to center a page designed for 1024 x 768 in lower
resolution displays.

I do not think it is possible to open a web paged in the center since
browser open web pages from the left.

Regards

Bundy
 
B

Blinky the Shark

Bundy said:
Something to consider since I do not think it is possible for a web
page to be opened centred in a browser.

Resize your viewport vertically and horizontally and see what happens to
this page (you'll get the 404 page I've been using for years):

http://blinkynet.net/bundy.html

I'm not proposing that this is a good idea for useful web pages.
 
B

Beauregard T. Shagnasty

Bundy said:
Thanks but I am trying to center a page designed for 1024 x 768 in
lower resolution displays.

Help me to understand. You want to paint a canvas one meter wide, and
then show it in the *center* of a half-meter wide picture frame?
I do not think it is possible to open a web paged in the center since
browser open web pages from the left.

Have a look: http://www.att.net/

Browsers open pages where the code tells them to put it.
 
J

Jonathan N. Little

Bundy said:
Thanks but I am trying to center a page designed for 1024 x 768 in lower
resolution displays.

I do not think it is possible to open a web paged in the center since
browser open web pages from the left.

Ah, firstly you did not quote what you were referring to.

Secondly, mine was just an example and I chose 600px arbitrarily you
could change the value:

demofixed { color: white;
background-color: red;
width: 1024px;
...

But I have to say, this is a very bad idea. I makes folks with say old
laptops with 800x600 res panels great difficulty. Learn to adjust your
design that can adapt to whatever "window"(not screen size) the browser
is at.
 

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

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top