Jump to content

Centering a page that's made of frames


Guest segael22

Recommended Posts

Guest segael22

I am making a webpage using frames. The only problem I have is that I want it to be made to work with normal 800x600 screen res. However, I want the page to be centered when view with bigger resolutions instead of just being pushed to the left edge of the page. How do I do this?

Link to comment
Share on other sites

At the very, very, tippy tippy top of the page, add a javascript that looks something like:<script type="text/javascript">var sWidth=screen.widthvar sHeight=screen.heightif(sWidth=="800" && sHeight=="600"){document.write("\<center\>")}</script>The red parts are the places i might have messed up. I don't know whether the width or the height are supposed to be what. :)

Link to comment
Share on other sites

The width is of course bigger than the height :((I have never yet seen a screen that is smaller than it is heigh.. :) )But what I wanted to say, is that using <center> was not allowed in framed documents, I think :)What you DO can do, is using inline frames, and centering them instead of using frames-master documents :D

Edited by Dan The Prof
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...