• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1709
  • Last Modified:

Is it possible to center a frameset?

Greetings,

I haven't messed with frames in I don't know how long. I thought I could just wrap the framset in a center-aligned table and have a screen centered design with frames. Apparently not.

Or, what am I missing??

Need this right away.

regards,

stevenjs
_______________________________
"I am but an egg."
--Stranger in a Strange Land
0
stevenjs
Asked:
stevenjs
  • 2
  • 2
1 Solution
 
alexhoganCommented:
Try this;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Titled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset rows="*,400,*" frameborder="NO" border="0" framespacing="0">
  <frame src="blank.htm" name="topFrame" scrolling="NO" noresize >
        <frameset cols="*,700,*" frameborder="NO" border="0" framespacing="0">
              <frame src="blank.htm" name="leftFrame" scrolling="NO" noresize>            
              <frame src="about: blank" name="mainFrame">
              <frame src="blank.htm" name="rightFrame" scrolling="NO" noresize>
        </frameset>
  <frame src="blank.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
</html>
0
 
stevenjsAuthor Commented:
Sorry for the delay, I thought I'd posted the follow-up question, but apparently I didn't.

Thank you for proving it can be done, alex, though it is giving me quite a headache figuring out how you've done it.

Please help me out with this, more specific question. The framework I need centered is your basic left side page navigation frame, bottom thumbnail picture frame, and main content area frame into which larger versions of the thumbnails load.

Could you label which frames in your code are the ones which are the dummy-frames creating the centering effect?

Thank you.

regards,

stevenjs
_______________________________
"I am but an egg."
--Stranger in a Strange Land
0
 
alexhoganCommented:
OK..,

This is pretty easy to figure out.

Here is the code...

<frameset rows="*,400,*" frameborder="NO" border="0" framespacing="0">
  <frame src="blank.htm" name="topFrame" scrolling="NO" noresize >
       <frameset cols="*,700,*" frameborder="NO" border="0" framespacing="0">
            <frame src="blank.htm" name="leftFrame" scrolling="NO" noresize>          
            <frame src="about: blank" name="mainFrame">
            <frame src="blank.htm" name="rightFrame" scrolling="NO" noresize>
       </frameset>
  <frame src="blank.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>

The mainFrame is the centered frame.  This is where I guess you're going to put  your content.
The topFrame and bottomFrame are just that.  The frames on the top and bottom that center the mainFrame from both ends.
The leftFrame and rightFrame center the mainFrame from either sides.

Above you'll see that the src for all of the frames except the mainFrame is a file called blank.htm.
The mainFrame itself is blank.  You can call an external dynamic or static file, or you can put an iFrame there.
0
 
stevenjsAuthor Commented:
Thanks, Alex, it is much more clear now, but what you have now is a single frame window, "mainFrame," that is centered, surrounded by dummy frames that do the centering.

What I need in place of that one window (frame), is three, a left navigation frame, bottom thumbnail frame and main content frame. I have a headache just thinking about what that would look like.

You've got the points, but would you care to have a go at this one more time?

Thanks.

regards,

stevenjs
_______________________________
"I am but an egg."
--Stranger in a Strange Land
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now