View Full Version : Resizing..


SurfSoCal
06-14-2004, 04:00 AM
ok i know i know i have problems... i post something all the time... and you guessed it i got another question ok well... go here www.geocities.com/islandinthesun144/frames . ok now look at the middle frame and see the update box thing? now how do i resize the box so the down button will be in line with it? thanks so much oh yeah p.s. here is the code!
<center>
<img src="updatebox.gif">
<!-- BeginningOfTable -->
<table cellspacing="0" cellpadding="0" border="0" BGCOLOR="transparent" bordercolor="#87ceeb" style="cursor:none" link="#87ceeb" vlink="#87ceeb" text="#87ceeb">
<tr>
<td>


<script language="JavaScript1.2">

//Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com)
//For full source code and TOS
//Visit http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm

iens6=document.all||document.getElementById
ns4=document.layers

//specify speed of scroll (greater=faster)
var speed=7

if (iens6){
document.write('<div id="container" style="position:relative;width:450;height:185;border:1 dotted;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:450;left:0;top:0">')
}
</script>

<ilayer name="nscontainer" width=450 height=120 clip="0,0,175,160">
<layer name="nscontent" width=450 height=120 visibility=hidden>

<!--INSERT CONTENT HERE-->
<P><center><width="350px">
<table width="300"><tr><td><center>
Insert your Updates here.

<!--END CONTENT-->
</p></tr></td></table>


</layer>
</ilayer>

<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>
</table>
<center><table width="450px">
<tr>
<td><a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a></td>
<td></td>
<td><p align="right"><a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="down.gif" border=0></a></td>
</tr>
</table></center>

<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}

function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",100)
}

function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+sp eed
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",100)

}

function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility ="show"
}
window.onload=getcontent_height
</script>

JustOnions
06-14-2004, 06:01 PM
My first suggestion would be not to use frames. They're overly complicated, search engines don't like them and the same thing can easily be done with css.

But my suggestion on the problem.

Try making both tables the same width.

Looking at your code:

TOP TABLE
<P><center><width="350px">
<table width="300"><tr><td><center>
hey this is the grand opening of island in the sun!! i am not quite done yet as you can see.
i will be adding more and more all the time! please come back soon! thanks for coming! please vote for me!!

<!--END CONTENT-->
</p></tr></td></table>

It's 300

2nd Table:

<center><table width="450px">
<tr>
<td><a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a></td>
<td></td>
<td><p align="right"><a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="down.gif" border=0></a></td>
</tr>
</table></center>


It's 450

That way both tables can be the same size and you can just left align the up.gif and right align the down.gif.


-Justin