...

View Full Version : Framesets & Browsers



webrock
12-25-2003, 08:30 PM
Hi all,

Thanks for all your help on my recent frameset problem. I have narrowed down the problem to be sizing on different computer screens. Can someone please advise me on the additional code I would need to add in order to have this open properly no matter what size monitor & also no matter what size resolution people have their screens set to. The website is
www.venusenvymusic.net. Here is the code I have for the opening page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Venus Envy...Women Who Rock </title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<frameset rows="450,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="banner.html" name="topFrame" scrolling="NO" noresize >
<frame src="home.html" name="mainFrame" scrolling="auto">
</frameset>
<noframes><body>

</body></noframes>
</html>

Thanks!!

Tracy

justame
12-26-2003, 03:13 AM
Originally posted by webrock
Can someone please advise me on the additional code I would need to add in order to have this open properly no matter what size monitor & also no matter what size resolution people have their screens set to.

web...
/me would just a suggest®...aka nottt just a dvise® lol...ummm to use just a %®...

webrock
12-26-2003, 09:58 PM
Where would I put the % code in?

Paul Jr
12-26-2003, 10:00 PM
Fluid layout. Define dimensions with percentages, instead of pixels.

webrock
12-27-2003, 04:53 AM
So instead of frameset rows=450, would I put 100%??? Sorry for being so ignorant, but I've never worked with framesets before.

sage45
12-27-2003, 05:25 AM
No more like:

<frameset rows="75%,25%" framespacing="0" frameborder="NO" border="0">

Your percents would = 100%, you just need to decide on what percentage of the viewable browser that you want for each row...

Another thing to do, and takes a lot more coding, is to make a standard size for each screen resolution...

i.e. --

<SCRIPT LANGUAGE="JavaScript">
<!--
if (window != top) top.location.href = location.href;
function redirectPage() {
var url640x480 = "640.480/index.htm";
var url800x600 = "800.600/index.htm";
var url1024x768 = "1024.768/index.htm";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 720) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 720) && (screen.height == 576))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width >= 1024) && (screen.height >= 768))
window.location.href= url1024x768;
else window.location.href= url1024x768;
}
// -->
</SCRIPT>

or even --:

<SCRIPT LANGUAGE="JavaScript">
<!--
if (window != top) top.location.href = location.href;
function redirectPage() {
if ((screen.width == 640) && (screen.height == 480))
{
document.write('<FRAMESET ROWS="250,*" FRAMEBORDER="NO" FRAMESPACING="0">')
document.write('<FRAME SCROLLING="NO" NORESIZE SRC="banner.html" NAME="topFrame">')
document.write('<FRAME SCROLLING="AUTO" SRC="home.html" NAME="mainFrame">')
document.write('</FRAMESET>')
}
else if ((screen.width == 720) && (screen.height == 480))
{
document.write('<FRAMESET ROWS="300,*" FRAMEBORDER="NO" FRAMESPACING="0">')
document.write('<FRAME SCROLLING="NO" NORESIZE SRC="banner.html" NAME="topFrame">')
document.write('<FRAME SCROLLING="AUTO" SRC="home.html" NAME="mainFrame">')
document.write('</FRAMESET>')
}
else if ((screen.width == 720) && (screen.height == 576))
{
document.write('<FRAMESET ROWS="350,*" FRAMEBORDER="NO" FRAMESPACING="0">')
document.write('<FRAME SCROLLING="NO" NORESIZE SRC="banner.html" NAME="topFrame">')
document.write('<FRAME SCROLLING="AUTO" SRC="home.html" NAME="mainFrame">')
document.write('</FRAMESET>')
}
else if ((screen.width == 800) && (screen.height == 600))
{
document.write('<FRAMESET ROWS="400,*" FRAMEBORDER="NO" FRAMESPACING="0">')
document.write('<FRAME SCROLLING="NO" NORESIZE SRC="banner.html" NAME="topFrame">')
document.write('<FRAME SCROLLING="AUTO" SRC="home.html" NAME="mainFrame">')
document.write('</FRAMESET>')
}
else if ((screen.width >= 1024) && (screen.height >= 768))
{
document.write('<FRAMESET ROWS="450,*" FRAMEBORDER="NO" FRAMESPACING="0">')
document.write('<FRAME SCROLLING="NO" NORESIZE SRC="banner.html" NAME="topFrame">')
document.write('<FRAME SCROLLING="AUTO" SRC="home.html" NAME="mainFrame">')
document.write('</FRAMESET>')
}
else
{
document.write('<FRAMESET ROWS="450,*" FRAMEBORDER="NO" FRAMESPACING="0">')
document.write('<FRAME SCROLLING="NO" NORESIZE SRC="banner.html" NAME="topFrame">')
document.write('<FRAME SCROLLING="AUTO" SRC="home.html" NAME="mainFrame">')
document.write('</FRAMESET>')
}

}
//-->
</SCRIPT>

HTH,

-sage-

Paul Jr
12-27-2003, 01:38 PM
Creating a fluid layout, to do what you want, will require you to do a bit more than just define the dimensions of your frameset with percentages. If done as such, the frameset will expand and contract, but your content won't, which will basically defeat the purpose.

me'
12-27-2003, 02:43 PM
Originally posted by Paul Jr
Creating a fluid layout, to do what you want, will require you to do a bit more than just define the dimensions of your frameset with percentages. If done as such, the frameset will expand and contract, but your content won't, which will basically defeat the purpose. The content will resize if it's expressed as a percentage of its parent, for example you have a div inside a frame with height: 80%; set, as the parent shrinks so will the child.

sage45
12-27-2003, 06:52 PM
Exactly...

The first of the two scripts I offered is the stricter approach as it requires you define everything for each screen resolution, in essence having basically 6 to 10 sites...

Whereas the second script allows for a looser approach by way of proportional sizing or specifying percentages for all of your content...

Good pickup me'... ;)

-sage-

webrock
12-27-2003, 10:12 PM
So would I want to use your second set of code (the very long one & that should cover it for the mainpage & also each page that loads into the mainframe?

me'
12-28-2003, 03:01 PM
Good pickup me'... Thanks, it's good to see you're posting again!

Paul Jr
12-28-2003, 06:15 PM
If webrocks's actual content is not designed fluidly, then screwing with his frameset isn't gonna achieve what he wants...

sage45
12-28-2003, 07:49 PM
Originally posted by webrock
So would I want to use your second set of code (the very long one & that should cover it for the mainpage & also each page that loads into the mainframe?
It really depends on how much work you are willing to do... If you choose the second script then you will have to keep in mind what Paul has been saying... You will need to ensure that all the content within the frames is resized in relation to the overall size of the frame... While this means more overall coding it also means easier manageability... Whereas the first approach means less overall coding but harder manageability...


Originally posted by me'
Thanks, it's good to see you're posting again!
Good to be back and glad to see I was missed... :D


Originally posted by Paul Jr
If webrocks's actual content is not designed fluidly, then screwing with his frameset isn't gonna achieve what he wants...
Also very true... Lets just hope that the point is well taken... ;)

-sage-



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum