Jump to content

Frames and scrollbars


HalifaxPiper

Recommended Posts

My index page sets a fixed left frame. Names are "leftframe" and "mainframe".

<frameset cols="21%,*" frameborder="no" border="0" framespacing="0">  <frame src="menu.php" name="leftFrame">  <frame src="main.php" name="mainFrame"></frameset><noframes><body>jscript->whole.php ....

My .CSS changes the main window scrollbars but won't change the leftFrame scrollbars! Adding the .css to the .php code in the leftFrame or the index file doesn't do it. :) Help!(I want the left window frame to not be a blue scrollbar)ThanksMark

Link to comment
Share on other sites

Thanks again for the help, here's the code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><script language="Javascript"><!--if (screen.width > 800) {document.location = "1024menu.php";}//--></script><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Menu</title><link rel=stylesheet href="inc/css.css"><script src="inc/script.js"></script><div id="curscroll" style="position:absolute;visibility:hidden"></div></head><body topmargin="0" leftmargin="0" bgcolor="#ABA99A" scroll=yes><table border="0" width=150><img src=img/menulogo.gif border=0><tr><td width=100%><a href="index.php" class="menulink" target="mainFrame" class=&{ns4class};><img src=img/butlet.gif border=0>Home/Main Page</a><br></td></tr><?include "cfunc.php";loadbox('header');          //Get all categories code            	$file=file("$itemsdb");$sl=0;            	while(list(,$value)=each($file)){            list($fid,$fkieu,$fmenhgia,$fgia,$fdes,$fviews,$fngay,$factive,$fvote,$fimg,$finfo,$fco,$fdaban,$fcat,$blank)=split( "\|", $value);              $done=false;                for($k=0;$k<sizeof($catsarr);$k++){                  if($fcat==$catsarr[$k]) $done=true;                            }              if($done==false) {                $catsarr[$sl]=$fcat;                $sl++;                  echo "<tr><td width=100%><a href=\"main.php?act=viewcat&catname=$fcat\" class=\"menulink\" target=\"mainFrame\" class=&{ns4class};><img src=img/butlet.gif border=0>$fcat</a></td></tr>";                  }            	}loadbox('footer');?><tr><td width=100%><a href="index.php" target="mainFrame" class="menulink" class=&{ns4class};><img src=img/butlet.gif border=0><img src=img/butlet.gif border=0><?=$lang[17];?></a></td></tr><tr><td width=100%><a href="menu.php" class="menulink" class=&{ns4class};><img src=img/butlet.gif border=0>menu</a><br><br><br><br><br><br><br><br><br><br></td></tr></table></body></html><!-- End header -->

Edited by Jonas
Link to comment
Share on other sites

Just a note to say thanks to the two people who offered help on this problem. The problem was caused by this.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">

When you declare the Doctype in a frame window you lose the ability to control scrollbar characteristics. Deleting the code above fixed the problem. :) Mark

Link to comment
Share on other sites

Just a note to say thanks to the two people who offered help on this problem. The problem was caused by this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">

When you declare the Doctype in a frame window you lose the ability to control scrollbar characteristics. Deleting the code above fixed the problem.  :) Mark

Glad you fixed the problem, but by using HTML frames you will run into bigger problems. My suggestion for you is to drop the frames alltogether, and - if you feel the frames functionality is of importance - try and emulate them with so called CSS Frames. You can make a search for CSS Frames to find a bunch of examples as well as articles on why they in most cases will be a better alternative than standard HTML frames. Here is one article and an CSS Frames example:CSS Frames or HTML FramesExample of CSS Frames
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...