Forum Moderators: open
Thanks in advance...
You could create a blank or background colored HTML page, and place it as right and left frames of a nested frameset:
<FRAMESET COLS="*,770,*">
Then put the frameset for your website content in the 770 pixel middle column. The right and left column frames will automatically center it.
And welcome to WebmasterWorld!
If you want to center a frameset vertically, you must put some "filler" pages on both sides of your frameset. The with of those will automatically adjust to the screen of viewers with the "*" attribute. You can use the same page for both sides, such as vertical_filler.htm:
<frameset cols="*,80">
<frameset cols="80,*" >
<frame name="leftFiller" src="vertical_filler.htm">
<frameset cols="80,*" >
<frame name="navFrame" scrolling="AUTO" noresize src="navframe.htm">
<frame name="mainFrame" scrolling="AUTO" noresize src="main.htm">
</frameset>
</frameset>
<frame name="rightFiller"src="vertical_filler.htm">
</frameset>
If you want to center it both horizontally and vertically, you need fillers on top and sides of your frameset.
<frameset rows="*,80" >
<frameset rows="80,*" >
<frame name="topFiller" src="horizontal_filler.htm" >
<frameset cols="80,*" >
<frame name="leftFiller" src="vertical_filler.htm">
<frameset cols="*,80" >
<frameset cols="80,*" >
<frame name="navFrame" scrolling="AUTO" noresize src="navframe.htm">
<frame name="mainFrame" scrolling="AUTO" noresize src="main.htm">
</frameset>
<frame name="rightFiller" src="vertical_filler.htm">
</frameset>
</frameset>
</frameset>
<frame name="bottomFiller" src="horizontal_filler.htm">
</frameset>
Enjoy!
<added> ARGH! tedster beat me again!</added>
<added again>fixed stuff, sorry!</added again>
(edited by: Macguru at 12:02 pm (utc) on April 29, 2002)
<snipped url> have 3 frames: up (80 rows), left (150 cols) and the rest. What I want to do is give some space to the left and right sides of the pages. Can you send me an exmaple, as I can not succesfully modify the examples you sent me? Thanks in advance...
(edited by: tedster at 9:57 pm (utc) on April 29, 2002)
It is not autorised to drop URL of sites you are building or related to, here at WebmasterWorld. You understand doing so can open the flood gates to self promotion. I understand here is not the case, but cannot review your site for this reason. We try to keep it general, without pointing to specific files.
Here is what I think can help you. File names and attributes will have to be modified to fit your specific needs. First create some empty html file in the same folder of your other frameset files and name it "shim.htm". This very same file can be the spacer you need on both sides or your actual frameset.
Then modify attributes and filenames in this sample code and paste it in your frameset file.
<frameset cols="*,80" frameborder="NO" border="0" framespacing="0">
<frameset cols="80,*" frameborder="NO" border="0" framespacing="0">
<frame name="leftFrame" scrolling="NO" noresize src="shim.htm">
<frameset rows="80,*" frameborder="NO" border="0" framespacing="0">
<frame name="topFrame" scrolling="NO" noresize src="your_top_frame_file.htm" >
<frameset cols="80,*" frameborder="NO" border="0" framespacing="0">
<frame name="your_nav_frame" scrolling="NO" noresize src="your_nav_frame.htm">
<frame name="mainFrame" src="your_main_frame.htm">
</frameset>
</frameset>
</frameset>
<frame name="rightFrame" scrolling="NO" noresize src="shim.htm">
</frameset>
Good luck!
If you care for people finding your site on serch engines, yes. Search engines spiders have great difficulty to properly index framed sites. When they can, they will index frames as separate pages. As a result of this, visitors will find your main framed pages alone, without your top and side navigation frames to discover the rest of your sites.
Of course, there are ways to avoid this, like using external redirection or write JavaScripts and filling the <NOFRAMES> tag with the actual (or better) content of your pages. It requires some work and used to lead for good results, not any more. I used to be a big frames fan not so long ago, but I switched. Since almost a year, some search engines dont give much importance to the <NOFRAMES> tag anymore and can penalise you for using JS redirects. The use of frames should be restricted to cases where the site's design makes it an absolute necessity.
WebmasterWorld archives are filled with information, about this topic. Feel free to use the "site search" feature (on top menu) to get all your awsers a lot faster. But I warn you, this can become addictive! :-)
A few years later, the client was struggling and asked what we might do to improve sales. At that point I had read enough anti-frames ranting that I was willing to experiment -- I "flattened" the website. Not only did my admin become much easier, but the server logs told the tale very quickly.
Page-views per unique nearly doubled - despite the fact that the old frameset naturally was giving 2 or 3 "bonus" page-views per screen. People simply stayed around longer and clicked on more pages. The newly flattened site began to grow and make more money. Today, they are quite profitable and continue to grow.
One website is not a scientific study, but this anecdote illustrates what I believe is a fact about frames. For some people, frames make sense. Somehow, that's exactly the way their brain organizes information and a framed site seems like the Promised Land of user interfaces.
But that's NOT everyone by a long shot. From the minute frames appeared on the scene, a good sized faction of the surfing public HATED them with a passion. I'm surmising that not everyone's brain organizes the world in the same way (that seems obvious after I say it) and only a certain percentage "get" frames.
Then there's all of Jakob Nielsen's observations about the way frames "break the metaphor" of the web. Consider the fact that bookmarking is out the window, for instance. Also consider the way that links for the currently displayed information stay active if they're in a separate navigation frame, meaning that people can click on active links that change nothing at all.
If you've got the time to spare, I'd encourage you to redesign. You just might find a wider audience.