Forum Moderators: open
Does anyone know how to code a fixed width centered framed page? I want the framed page to be 700 pixels wide and centered.
It would be a simple top and main frame.
I can fix the width and center align the top frame in the coding for page top.html but the problem arises when I introduce the main page which is from a merchants site. This element of the page aligns to the left.
The coding I am using is as follows:
<frameset rows="130,*" frameborder="NO" border="0" framespacing="0">
<frame src="top.html" name="topFrame" scrolling="NO" noresize>
<frame src="http://www.companyname.com/pagename.html" name="mainFrame">
</frameset>
Is there something I can put in the frameset coding to do this?
You may want to see if you have other alternatives. I consider frames to be a last resort.
<div class="standard_css_stuff"><table style="width:100%"><tr><td><?php include ( "http://www.somewebpage.com/" );?></td></tr></table></div> The <div> reacts to the context, and makes sure that your setting is correct in regards to the page, and the <table> reacts to the content, and makes sure that the entire page is included.
That will give you what you need. That's what I do for almost exactly the same thing.
However, you may need to get fancy and strip out page header information. It doesn't give you a real frame, so the page won't render in a real frame manner.
You pretty much have to use PHP. There's not really any other way to do it.
allow_url_fopen [us3.php.net] needs to be enabled, but I think it is by default in >4.0.3 PHP installs. It works on every server I've tried.
If you include an external valid html page with php, you'll end up creating an invalid html structure. Probably with duplicated <html><head><body> tags.
Yup. That's why I indicated you may need to get fancy.
I use this in a similar manner to my AJAX calls. I have PHP files that return incomplete content.
I'm not sure if you have a real answer available. I'll keep an eye out on this thread.
<frameset rows="130,700,*" frameborder="NO" border="0" framespacing="0">
<frame src="top.html" name="topFrame" scrolling="NO" noresize>
<frame src="http://www.companyname.com/pagename.html" name="mainFrame">
<frame>
</frameset>