Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

SOAD

[Resolvido] Layer

Recommended Posts

Como se coloca uma layer com barra de rolagem , mas , apenas vertical ... a texto nao precisa de barra horizontal , mas fica akela coisa feia embaixo ... tem como tirar ?

Compartilhar este post


Link para o post
Compartilhar em outros sites

você deve está definindo "overflow:scroll",defina "Overflow: auto".

na verdade eu num defini nada :P , eu so coloquei uma tabela dentro de uma layer no DW e coloquei scrools nas propriedades ... :) ...Iframe ?? desculpe minha santissima ignorancia, mas ... o que eh ??

Compartilhar este post


Link para o post
Compartilhar em outros sites

ok, mas num tem jeito de ser fazer apenas com layers ...? com scrollbar apenas vertical ? coo no site www.luanapiovani.com.br

Compartilhar este post


Link para o post
Compartilhar em outros sites

O script:

 

<html><head>	<title>Script</title><!------------Script de Scroll------------------------------------------->	<script LANGUAGE="JavaScript">        //<!-----------------------------------------------------------        // Scroll Vertical - Agenteweb - http://www.agenteweb.com.br        // Dhtml Layer & V. Scroll        //-------------------------------------------------------------        //        // Instrucoes: copiar todas as linhas do script e nao esquecer do body onload...        // copiar os divs        // para compatibilidade com o netscape os os divs devem ter os tamanhos        // modificados de acordo com os dados abaixo        // -------------------------------------------------------------        //         // Configuracoes do scroll horizontal        // coordenadas e dimensoes do texto        txt_x = 305;       txt_y = 105;             txt_w = 420; // largura        txt_h = 245; // altura        // altura e  largura dos botoes - copiar do arquivo de imagem        btn_h    = 16;        btn_w    = 16;        // altura e largura do botao de knob da scroll - copiar do arquivo de imagem        knob_h = 37;          knob_w = 16;                // novidade - margem do texto        margin   = 10;      t_refresh = 10;  // tempo de refresh entre um teste e outro        space     = 9;   // tamanho em pixels do salto por click        // caminho para os arquivos de imagens        path_img = "/awscroll/images/verde/"         //--></script><script LANGUAGE="JavaScript">//-----------------------------------------------------------------\\// Scroll Horizontal - Agenteweb - http://www.agenteweb.com.br     \\// Dhtml Layer & H. Scroll                                         \\//  based on DocOzone's Javascript code http://www.ozonicLabs.com/ \\//-----------------------------------------------------------------\\// Versao 1.0 // bugs conhecidos - resize no netscape, perde a configuração// possivel solucao - onresize no body	//calcula as posicoes do botao up	btn1_x = txt_x + txt_w + margin;	btn1_y = txt_y;	//calcula as posicoes do botao down	btn2_x = txt_x + txt_w + margin;	btn2_y = txt_y + txt_h - btn_h;   // calcula a area e as coordenadas da area de scroll	sarea_y = txt_y;	sarea_x = txt_x + txt_w + margin; 	sarea_h = txt_h; // - (btn_h * 2);	sarea_w = btn_w;  	sarea_h_real = txt_h - (btn_h *2);	// posicao inicial do knob y,x	knob_y = sarea_y + btn_h;	knob_x = sarea_x; // pre-load das imagens - seguir o exemplo "awscroll/images/default"	var img_up_pre  = new Image();	var img_dn_pre  = new Image();	var img_vkb_pre = new Image();	var img_vbg_pre = new Image();		img_up_pre.src = path_img + "arrowup0.gif";	img_dn_pre.src = path_img + "arrowdn0.gif";	img_vkb_pre.src = path_img + "vknob.gif";	img_vbg_pre.src = path_img + "vbg.gif";// inicializacoes de browsers	window.onerror=null;	NS = (document.layers) ? 1:0	IE = (document.all) ? 1:0	Opera = 0;	gecko = (document.getElementById) ? 1:0  loaded=0;  layerPreStart = "";  layerStart = "";  layerLeft = ".left";  layerTop = ".top";  layerWidth = ".width"  layerHeight = ".height"  layerStyle = ""; 	if (NS) 	{  layerPreStart = "document.divCont.";  layerStart = "document.";  layerStyle = "";  	}	if (gecko || IE)	{  layerStart = "document.getElementById('";  layerStyle = "').style"; 	}	if (IE && !gecko)	{  layerStart = "document.all.";  layerStyle = ".style"; 	}	if (navigator.appName.indexOf('Opera') != -1)	{   Opera=1; 	}	travel = sarea_h - (btn_h * 2) - knob_h; //aqui	if (NS) 	{  window.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK | Event.KEYPRESS);  window.onMouseMove = moveHandler;  window.onMouseDown = StartE;  window.onMouseUp = EndE;  window.onKeyPress = KeyboardE;	}	else if (IE)	{  document.onmousemove=moveHandler;  document.onmousedown=StartE;  document.onmouseup=EndE;  document.ondragstart=StartE;  document.onkeyup = KeyboardE;	}	else if (gecko)	{  document.ondragstart = StartE;  document.addEventListener("mousedown", StartE, true);  document.addEventListener("mousemove", moveHandler, true);  document.addEventListener("mouseup", EndE, true);	}	// ponteiros de estado	pageY = 0;sAmount = 0;	cUp=0; cDown=0; cBar=0; mDown=0;	//carga dos styles	//bloco de styles	fprint("<style type=\"text/css\">")	fprint("#divCont     {position:absolute; left:0; top:0; width:" +txt_w+ "; height:" +txt_h+ ";clip:rect(0px," +txt_w+ "px," +txt_h+ "px,0px);z-index:2000;visibility:hidden;}")	fprint("#divTextCont {position:absolute; left:0; top:0;z-index:1000;}")	fprint("#scrollbtnup {position:absolute; left:0; top:0; width:" +btn_w+ "; height:" +btn_h+ ";z-index:1500;visibility:hidden;}")	fprint("#scrollbtndn {position:absolute; left:0; top:0; width:" +btn_w+ "; height:" +btn_h+ ";z-index:1500;visibility:hidden;}")	fprint("#scrollbkg   {position:absolute; left:0; top:0; width:" +btn_w+ "; height:" +btn_h+ ";z-index:1000;visibility:hidden;}")	fprint("#sliderknob  {position:absolute; left:0; top:0; width:" +btn_w+ "; height:" +btn_h+ ";z-index:2000;visibility:hidden;}")	fprint("</style>")function awscroll_setup(){ 	loaded=1; // indica que foi carrega	// monta as imagens certas	if (NS)	{  document.scrollbtnup.document.imgup.src    = img_up_pre.src  document.scrollbtndn.document.imgdn.src    = img_dn_pre.src  document.sliderknob.document.img_vkb.src   = img_vkb_pre.src  document.scrollbkg.document.img_vbg.src   = img_vbg_pre.src	}	if (IE)	{  document.all.scrollbtnup.document.imgup.src    = img_up_pre.src  document.all.scrollbtnup.document.imgup.width  = btn_w  document.all.scrollbtnup.document.imgup.height = btn_h    document.all.scrollbtnup.document.imgdn.src    = img_dn_pre.src  document.all.scrollbtnup.document.imgdn.width  = btn_w  document.all.scrollbtnup.document.imgdn.height = btn_h    document.all.sliderknob.document.img_vkb.src    = img_vkb_pre.src  document.all.sliderknob.document.img_vkb.width  = knob_w  document.all.sliderknob.document.img_vkb.height = knob_h    document.all.scrollbkg.document.img_vbg.src    = img_vbg_pre.src  document.all.scrollbkg.document.img_vbg.width  = btn_w  document.all.scrollbkg.document.img_vbg.height = txt_h - (btn_h * 2)	}	//posiciona os elementos dos layers a partir das configuracoes	//conteudo	eval(layerStart+"divCont"+layerStyle+layerLeft+" = " + txt_x);eval(layerStart+"divCont"+layerStyle+layerTop+" = " + txt_y);	eval(layerStart+"divCont"+layerStyle+layerWidth+" = " + txt_w);eval(layerStart+"divCont"+layerStyle+layerHeight+" = " + txt_h);	//knob (caixinha do scroll)	eval(layerStart+"sliderknob"+layerStyle+layerLeft+" = " + knob_x);eval(layerStart+"sliderknob"+layerStyle+layerTop+" = " + knob_y);	//fundo do scroll	eval(layerStart+"scrollbkg"+layerStyle+layerLeft+" = " + sarea_x);eval(layerStart+"scrollbkg"+layerStyle+layerTop+" = " + knob_y);	//botao de up	eval(layerStart+"scrollbtnup"+layerStyle+layerLeft+" = " + btn1_x);eval(layerStart+"scrollbtnup"+layerStyle+layerTop+" = " + btn1_y);	//botao de down	eval(layerStart+"scrollbtndn"+layerStyle+layerLeft+" = " + btn2_x);eval(layerStart+"scrollbtndn"+layerStyle+layerTop+" = " + btn2_y);	if (NS)    {conH=document.divCont.document.divTextCont.document.height;}	if (IE)    {conH=document.all.divTextCont.offsetHeight;} //document.height	if (gecko) {conH=document.getElementById('divTextCont').offsetHeight;}	if (Opera) {conH=document.getElementById('divTextCont').style.pixelHeight;}	//inicializa o monitoramento	if (conH > sarea_h) //aqui era	{  t_refreshID = setInterval ("fix()",t_refresh);  sAmount = conH-sarea_h;reveal();	}	else	{  eval(layerStart+"divCont"+layerStyle+".visibility = 'visible'");	}}function reveal(){	if (conH >= sarea_h) 	{  eval(layerStart+"scrollbkg"+layerStyle+".visibility = 'visible'");  eval(layerStart+"sliderknob"+layerStyle+".visibility = 'visible'");  eval(layerStart+"scrollbtnup"+layerStyle+".visibility = 'visible'");  eval(layerStart+"scrollbtndn"+layerStyle+".visibility = 'visible'");  eval(layerStart+"divCont"+layerStyle+".visibility = 'visible'");	}}function moveHandler(e){	if (NS || IE || gecko || Opera)	{  if (loaded && NS)   { 	 reveal();  }  Xpos = (IE)?event.x:e.pageX  Ypos = (IE)?event.y:e.pageY   //se esta dentro da posicao x do scroll  if ((Xpos >= sarea_x) && (Xpos <= sarea_x+sarea_w))   {  	 //se esta na altura do botao 	 if ((Ypos >= sarea_y) && (Ypos <= sarea_y+btn_h))   	 {    cUp=1; cDown=0; cBar=0;  	 } 	 if ((Ypos >  sarea_y+btn_h) && (Ypos < btn2_y))  	 {     cUp=0; cDown=0; cBar=1;  	 } 	 if ((Ypos >= btn2_y) && (Ypos <= btn2_y+btn_h))  	 {     cUp=0; cDown=1; cBar=0;  	 }  }  else   {  	 cUp=0;cDown=0;cBar=0;mDown=0;  }	}}function EndE() { 	mDown=0;	if (IE)	{   return false;	}}// funcao nao implementada// visa responder as setas do tecladofunction KeyboardE(e){ 	if (NS)	{  mDown=1;  //se teclou espacos  if (e.which==32)  { 	 cUp=0; cDown=1; cBar=0;  }	}	if (IE)	{	//alert(event.which)	return false;	}}function StartE() { 	mDown=1;	if (cBar || cDown || cUp || IE)	{   return false;	}}function fix() {	if (mDown && cBar) 	{  where = Ypos-(knob_h/2);   if (where < knob_y)   {  	 where=knob_y;   }  if (where > btn2_y - knob_h )   {    where = btn2_y - knob_h;   }  eval(layerStart+"sliderknob"+layerStyle+layerTop+" = where");   pageY = -((where-knob_y)/travel) * sAmount;  eval(layerPreStart+layerStart+"divTextCont"+layerStyle+layerTop+" = pageY"); 	}	if (mDown && (cUp || cDown)) 	{  Clicker(); 	}}function Clicker() {	if ((cUp && (pageY < 0)) || (cDown && (pageY > (-sAmount))) || cBar) 	{  if (cUp)   {  	 pageY = pageY + space; 	 if (pageY > 0)  	 {    pageY = 0;  	 }  }  else if (cDown)   {  	 pageY = pageY - space; 	 if (pageY < (-sAmount))  	 {     pageY = (-sAmount);  	 }  }  else if (cBar) //notar que o knob para seu centro no ponteiro do mouse  {  	 pageY = -(((Ypos-(knob_h/2))-(sarea_y+btn_h))/travel) * sAmount;   }  eval(layerPreStart+layerStart+"divTextCont"+layerStyle+layerTop+" = pageY");  where = sarea_y+btn_h-((pageY/sAmount)*travel);  if (where < sarea_y+btn_h)  {  	 where=sarea_y+btn_h;   }   if (where > sarea_h+sarea_y-btn_h-knob_h)   {  	 where=sarea_h+sarea_y-btn_h-knob_h;   }  eval(layerStart+"sliderknob"+layerStyle+layerTop+" = where"); 	}}function topper() {	where=knob_y;	pageY=0;	eval(layerStart+"sliderknob"+layerStyle+layerTop+" = where"); 	eval(layerPreStart+layerStart+"divTextCont"+layerStyle+layerTop+" = pageY");}function fprint(param){	document.writeln(param )}</script><!-- final do script de scroll --><!---------Fim do Script de Mouseover-----------><!----iNICIO DE SCRIPT PARA FAZER UM SHOWHIDDEN LAYER---><script language="JavaScript">function MM_showLayers() { //v1.0  var i, visStr, args;  args = MM_showLayers.arguments;  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)    visStr   = args[i+2];    if (navigator.appName == 'Netscape') {      if (document.layers != null) eval(args[i]+".visibility = '"+visStr+"'");    } else { //IE      if (visStr == 'show') visStr = 'visible'; //convert vals      if (visStr == 'hide') visStr = 'hidden';      if (document.all != null) eval(args[i+1]+".style.visibility = '"+visStr+"'");  } }}</script><!-----FIM SCRIPT SHOWHIDDEN LAYER----><script language="JavaScript1.2"><!--/* Zooming link script by Paul Anderson, copyright 2002 CNET Builder.com.   May be freely used with attribution. Not for resale. All rights reserved.    Make a link zoom open by adding the event handler      onclick="zoomBox(event,this);return false"      To zoom into a new, positioned window add width, height, left, and top      onclick="zoomBox(event,this,640,480,100,50);return false"   */var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;function zoomBox(evt,zlink,maxw,maxh,tox,toy) {if (arguments.length > 2) zNew=1;scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;toX=tox?tox:0;toY=(toy?toy:0)+scrollH;fromX=evt.pageX?evt.pageX:evt.clientX;fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);adjX=toX+evt.screenX-fromX;adjY=toY+evt.screenY-fromY;if (document.createElement && document.body.appendChild && !zBox) {	zBox=document.createElement("div");	zBox.style.position="absolute";	document.body.appendChild(zBox);} else if (document.all && !zBox) {	document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';	zBox=document.all.zBoxDiv;} else if (document.layers && !zBox) {	zBox=new Layer(maxW);	zBox.style=zBox;	}zLink=zlink;doZoom();}function doZoom() {zStep+=1;zPct=(10-zStep)/10if (document.layers) {	zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));	zBox.document.open();	zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");	zBox.document.close();	} else {	zBox.style.border="2px solid #999999";	zBox.style.left=toX+zPct*(fromX-toX);	zBox.style.top=toY+zPct*(fromY-toY);	zBox.style.width=maxW*(1-zPct);	zBox.style.height=maxH*(1-zPct);	}zBox.style.visibility="visible";if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);else {	zBox.style.visibility='hidden';	zStep=0;	if (zLink && !zNew) location.href=zLink.href;	else if (zLink && zNew) {  var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars,resizable');  zNew=null;  }	}}//--></script></head><body bgcolor="#95AF02" text="#000000" link="#000000" alink="#666666" vlink="#000000" onLoad="awscroll_setup()" background="/mundo/images/fundo_main.gif" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><!-- importante manter a linha onLoad="awscroll_setup()" no <BODY> --><div align="center">  </td>  </tr>  </table></div><!-- inicio do bloco de divs do scroll --><DIV id="scrollbtnup"><IMG name="imgup"   width=16 height=16 border=0 src="awscroll/images/default/spacer.gif"></DIV><DIV id="scrollbtndn"><IMG name="imgdn"   width=16 height=16 border=0 src="awscroll/images/default/spacer.gif"></DIV><!-- ALTERAR A LINHA DE BAIXO COM ALTURA - 32 (ALTURA BOTAO *2)--><DIV id="scrollbkg">  <IMG name="img_vbg" width=16 height=213 border=0 src="awscroll/images/default/spacer.gif"></DIV><DIV id="sliderknob"> <IMG name="img_vkb" width=16 height=37 border=0 src="awscroll/images/default/spacer.gif"></DIV><!-- fim do bloco de divs do scroll --><!-- inicio dos divs de conteudo --><DIV id="divCont"><DIV id="divTextCont"><!-- inicio do conteudo --><a name="topo"></a><table width="100%" border="0" cellspacing="0" cellpadding="5">   <tr>    <td width="100%" colspan="2" valign="top">      <table cellpadding=2 cellspacing=0 border="0" width="100%">     <td width="403"><table width="100%" border="0" cellspacing="0" cellpadding="5">   <tr>    <td width="100%" colspan="2" valign="top">      <table cellpadding=2 cellspacing=0 border="0" width="100%">     <td width="403"><table cellpadding="0" cellspacing="0" border="0" width="403">   <tr>                    <td width="100%" valign="top"> <font face="verdana, helvetica, arial, sans-serif" size="1" color="#D9FF00">                       <b>                      </b></font><font face="Verdana,Arial" size="1">dlfkgkjsdfg</font><p>dsfgjdsfg</p><p>dsfgklsdhfgd</p><p>sfgdsjkfgdsf</p><p>gdsfgkjsdfkgsd</p><p>gdsfkgjsdçflgsd</p><p> </p></td>                  </tr>    </table>          <!-- FIM Com a Palavra -->            <tr>                  <td width="100%" valign="top"><tr valign="top">                      <td>                       </html>

Ai é so configurar.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.