Guest segael22 Posted November 17, 2005 Share Posted November 17, 2005 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 More sharing options...
Chocolate570 Posted November 17, 2005 Share Posted November 17, 2005 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 More sharing options...
Jack McKalling Posted November 23, 2005 Share Posted November 23, 2005 (edited) 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 Edited November 23, 2005 by Dan The Prof Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now