Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrollable area?!?!?

Status
Not open for further replies.

HuggerFanta

Technical User
Apr 22, 2002
87
SE
Hello!
I was woundering if there is someone that could help me to find info or script that explains how to insert scrollable areas like on the site: ???

Is this Iframes or layers???
If worikig with frames, how do I possitioning the layer to be placed at the exact same place depending on resolution and center table sites???

/ huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
By having a look at the source of the exemple page you gave, you'll see the developper used an IFRAME. That works well exept for Netscape. You can do the same thing using a Div tag with style attribute set to :
Code:
DIV {
overflow : scroll;
}
Water is not bad as long as it stays out human body ;-)
 
OK!
I qite understand what you meen! IT´S A LAYER SOLUTION!

But....

Some questions!

1. How dose this work if the site uses centerd tables???
2. How dose it work in diffrent resolutions?
3. How do I setup this to work with diffrent browsers and resolutions?

PLZ help me
huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
Div tags a generic containers. By setting their style attributes, you can do almost what you want with them. By default, they're treated as block tags (like a TD, an IMG). and are included in the general HTML structure of your page. That means that you can include them in
TD just like anyelse tag. Water is not bad as long as it stays out human body ;-)
 
YES YES AND YES again!

This is realy what I whant!!!

Can the scrallable area e configured as I wich???
Placed anywhere, and sized as I need it to be???

What browser and OS do support this???

/ huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
To do what you want with the div, use the style attributes :
Code:
position:absolute;
: places the div WHERE YOU WANT without worry of your html page structure.
Code:
width:1024px;
: defines width
Code:
height:768px;
: defines height
Code:
z-index:1;
; defines if your div is placed above (posive value) or under (negative value) the rest of your page.
Code:
left: 0px;
: defines left pos
Code:
top: 130px;
: defines top pos.
Code:
overflow: auto
defines what to do with content of the div if it's taller than div limits. "auto" value adds scrolls if/where needed. "scroll" value add both scrollbars even if not needed. "hidden" doesn't display all that is out div height and width.
Water is not bad as long as it stays out human body ;-)
 
At a glance this is more than likely achieved through the <iframe> tag which allows you too insert internal frames in your browser window which act the same as inserting images. Now supported by all browsers. Type Iframe into google and do a search that is what i did for more details.
 
Thank you!
I think i will investigate this, and the see what I use!!!

/ huggerFanta --------------------------------------
Kind regards;
HuggerFanta
 
Here's the code I used. Hope it helps. I had to add the Java to make sure that the <div> appeared in the right spot at different screen resolutions.

&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;

<td align=left valign=top background=&quot;/images2/blurry_background2.jpg&quot; height=&quot;247&quot;>

<SCRIPT LANGUAGE=&quot;Javascript&quot;><!--

if (self.screen) { // for NN4 and IE4
width = screen.width
height = screen.height
// Testing this first prevents firing the slow Java of NN4
}
else if (self.java) { // for NN3 with enabled Java
var jkit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = jkit.getScreenSize();
width = scrsize.width;
height = scrsize.height;
}
else{
width = height = '?' // N2, E3, N3 w/Java off, probably Opera and WebTV

}
//document.write(&quot;Your Screen Resolution is:&quot;);
//document.write(width +&quot;×&quot;+ height)
switch(width)
{
case '1024':
left = 122;
break;

case &quot;800&quot;:
left = 11;
break;

default:
left = 11;
break;

}//end of switch

//or whatever based on the above results

//--></SCRIPT>

<div id=&quot;Layer1&quot; style=&quot;position:absolute; width:760px; height:247px; z-index:1; left: document.write(left); top: 130px; overflow: auto&quot;>


<table width=&quot;100%&quot; cellpadding=&quot;8&quot; cellspacing=&quot;0&quot; border=&quot;0&quot;>
<tr>
<td align=left>
text is here
</td>
</tr>
</table></div>

</td>
</div>

&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;

Cheers,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top