Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Centering Frames with IE and NS 1

Status
Not open for further replies.

TheInsider

Programmer
Jul 17, 2000
796
CA
Hello,

I have a website that is developed using frames. The website contains header, body, and footer frames, and is only 760 pixels wide. I am required to center it horizontally on the screen. The following snippet from the frames page works perfectly in Netscape but fails to load at all in Internet Explorer -- i get a completely gray screen. Can someone please explain why this is so and suggest how i could acheive the desired result in both browsers?

Code:
	<frameSet cols=&quot;*, 760, *&quot;>
		<frameSet rows=&quot;*&quot; frameBorder=&quot;0&quot; noResize scrolling=&quot;no&quot;></frameSet>


		<frameSet rows=&quot;60, *, 40&quot;>
			<frame frameBorder=&quot;0&quot; name=&quot;header&quot; noResize scrolling=&quot;no&quot; src=&quot;header.htm&quot;>
			<frame frameBorder=&quot;0&quot; name=&quot;body&quot; noResize scrolling=&quot;auto&quot; src=&quot;body.htm&quot;>
			<frame frameBorder=&quot;0&quot; name=&quot;footer&quot; noResize scrolling=&quot;no&quot; src=&quot;footer.htm&quot;>
		</frameSet>


		<frameSet rows=&quot;*&quot; frameBorder=&quot;0&quot; noResize scrolling=&quot;no&quot;></frameSet>
	</frameSet>

As you can see there are 2 padding column frames on either side right now, using &quot;*&quot; as their widths.

Thank you,

TheInsider
 
Hi There,

Well, here's how I would do it!

Take a look at the example I posted in this forum in reply to &quot;Header Body Footer design...&quot;.

Replace the &quot;Contents&quot; with

[tt]<CENTER>
<IFRAME SRC=&quot;body.htm&quot; WIDTH=&quot;760&quot; SCROLLING=&quot;AUTO&quot;>
</IFRAME>
</CENTER>[/tt]

Good luck!


Jakob
 
Thank you, I'll give it a try and let you know if I'm successful. I believe the <center></center> tag has been deprecated though, so I'm hesitant to use it.

TheInsider
 
<frameSet cols=&quot;*, 760, *&quot; frameBorder=&quot;0&quot;>
<frame noResize scrolling=&quot;no&quot; />
<frameSet rows=&quot;60, *, 40&quot; frameBorder=&quot;0&quot;>
<frame name=&quot;header&quot; noResize scrolling=&quot;no&quot; src=&quot;header.htm&quot;>
<frame name=&quot;body&quot; noResize scrolling=&quot;auto&quot; src=&quot;body.htm&quot;>
<frame name=&quot;footer&quot; noResize scrolling=&quot;no&quot; src=&quot;footer.htm&quot;>
</frameSet>
<frame noResize scrolling=&quot;no&quot; />
</frameSet>

Clive
 
Thanks Clive, I'll give it a try and get back to everyone with the results.
 
Thank you both Clive and Jakob for your assistance. Clive was correct in his assessment of my code, and the solution above worked perfectly in both browsers.

Thanks again,

TheInsider
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top