homepage Welcome to WebmasterWorld Guest from 54.224.202.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Centering a Framed Page
how to do it...
newnewbie1




msg:588721
 1:24 am on Feb 6, 2003 (gmt 0)

I am having the hardest time trying to center a framed page... Here is my code:

<html>
<head>
<title>Welcome to MyPage.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<frameset rows="137,*" frameborder="NO" border="0" framespacing="0">
<frame src="topNav.htm" name="topFrame" scrolling="NO" noresize >
<frame src="http://myaccount.example.com/search/" name="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>

[edited by: korkus2000 at 2:56 pm (utc) on Feb. 11, 2003]
[edit reason] widgetized url [/edit]

 

Macguru




msg:588722
 2:35 am on Feb 6, 2003 (gmt 0)

Try adding a frame on both sides of your frameset.

belgian_su




msg:588723
 7:52 pm on Feb 6, 2003 (gmt 0)

you can add align=center
<frame .... align=center>

i don't test it so ...

you can also center your htm page

examp. <frame src="GH.html">

your GH.html files look like

<body>
<div style="align:center">
..
</div>
or
<body><center> ... </center>

or with a table <table border=0 align=center>
<tr height="100%">
<td width="100%">
..
..
</td>
</tr>
</table>

newnewbie1




msg:588724
 7:20 pm on Feb 10, 2003 (gmt 0)

I tried align="center" on the frame, and it's still not working!

Wonder what could be wrong?

It looks like the framed set is a bout 10 pixels to the right of the non-framed version.

Hmmmmm...

Here is my code for the frames:

<html>
<head>
<title>Welcome to AndyRitan.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<frameset rows="137,*" frameborder="NO" border="0" framespacing="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#999999">
<frame src="topNav.htm" name="topFrame" scrolling="NO" noresize leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" align="center">
<frame src="http://andyritan.domain.com/search/" name="mainFrame" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" align="center">
</frameset>
<noframes><body>

</body></noframes>

</center></center></html>

And then the two pages that are being framed are have this body tag:

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#999999">

And the main table that all the page stuff on is centered:

<table width="738" border="0" cellspacing="0" cellpadding="0" align="center">

So I can't understand why the framed verion of these pages would be 10 pixels to the right of the non-framed version.... Hmmmmm.........

[edited by: korkus2000 at 2:57 pm (utc) on Feb. 11, 2003]
[edit reason] widgetized url [/edit]

belgian_su




msg:588725
 2:29 pm on Feb 11, 2003 (gmt 0)

I was wrong
on the frame and frameset no align is possible

you could do something like this

<frameset rows="137,*" frameborder="0" border="0" framespacing="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#999999">
<frame frameborder="1" src="topnav.html" name="topFrame" scrolling="NO" noresize leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<frameset cols="*,600,*">
<frame src="blank.htm">
<frame frameborder= "0" src="http://andyritan.domain.com/search/" name="mainFrame" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<frame src="blank.htm">
</frameset>
</frameset>

or you can align your table in topnav.htm

tip
<table border=1>

for testing so you can see the aligning better

if you want that the text is aligned with the text of your other frame you should use a different width of your table
600 instead of 738 because your second frame is centered with a table width of 600

[edited by: korkus2000 at 2:57 pm (utc) on Feb. 11, 2003]
[edit reason] widgetized url [/edit]

belgian_su




msg:588726
 2:32 pm on Feb 11, 2003 (gmt 0)

sorry
it's
<frameset rows="137,*">
<frameset cols="*,600,*">
<frame src="blank.htm">
<frame src="topnav.htm">
<frame src="blank.htm">
</frameset>
<frame src="http://andyritan.domain.com/search/">
</frameset>

[edited by: korkus2000 at 2:58 pm (utc) on Feb. 11, 2003]
[edit reason] widgetized url [/edit]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved