Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Automatically resizing frames in html
Closed Thread
Old 10-25-2005, 06:35 PM   #1 (permalink)
 
Newb Techie

Join Date: Sep 2003

Posts: 20

static244

Default Automatically resizing frames in html

Ok here is my dilemma...

I have 3 frames in my page, like the image below.
http://home.pcisys.net/~encantadas/static244/frames.jpg

I want the middle frame (2) to appear in the center of the browser window no matter what resolution the viewer is at or the size of their browser window.

Here is my current html code...

---------------------------------------------------------------

<html>
<title></title>


<frameset cols="19%,980,*" border="0">
<frame src="blank.htm" name="farLeft" scrolling="no">
<frame src="index2.htm" name="centercolumn" scrolling="no">
<frame src="blank.htm" name="farRight" scrolling="no">
</frameset>

</html>

----------------------------------------------------------------

I know the "19%" is wrong, thats just the size it has to be at 1600x1200. I just don't know what to replace it with.

Thanks,
statis244
static244 is offline  
Old 10-25-2005, 06:54 PM   #2 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default

--------------------------------------
<html>

<head>
<title>Title</title>
</head>

<frameset cols="20%,*,20%">
<frame name="left" target="main">
<frame name="main">
<frame name="right">
<noframes>
<body>



This page uses frames, but your browser doesn't support them.</p>

</body>
</noframes>
</frameset>

</html>
--------------------------------------


<frameset cols="20%,*,20%">

In this, just put X%, or a set size in pixels, and a * in the middle. (Sorry, have not used frames much, but it seems this works?).
__________________
Vormund is offline  
Old 10-25-2005, 07:31 PM   #3 (permalink)
 
Newb Techie

Join Date: Sep 2003

Posts: 20

static244

Default

Thanks. A slight variant of that code ended up working. Here it is.

-------------------------
<html>
<title></title>

<frameset cols="19%,980,19%" border="0">
<frame src="blank.htm" name="farLeft" scrolling="no">
<frame src="index2.htm" name="centercolumn" scrolling="no">
<frame src="blank.htm" name="farRight" scrolling="no">
</frameset>

</html>
-----------------------------

I needed to keep the middle frame the same size no matter what so I left it at 980px. It seems when I do this and resize the window, the 19% parts get overridden and they just become equal in size.

Thanks,
static244
static244 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On