Click to See Complete Forum and Search --> : removing scroll bars


zog953
04-23-2006, 11:58 AM
i would like to know if it is possible to remove only the bottom scroll bar from an <iframe>?

cheerz

johneva
04-23-2006, 12:08 PM
Add this to the body tag of the file the iframe is calling.


style="overflow-x:hidden;overflow-y:scroll;"


or even better add it to the CSS for that file

zog953
04-23-2006, 12:22 PM
please excuse me, i dont really understand. could you simplify that for me a bit please?

johneva
04-23-2006, 12:27 PM
Right you have two file when it comes to iframes the main page and the page within the iframe.

In the file that within the main page add the code I gave you to the body tag.

Here is an example of the two files in there simplest form.

Main File called what ever.

<html>
<head>
<tile>Main page</title>
</head>
<body>
<iframe src="target.html" width="50%" height="10%"></iframe>
</body>
</html>


File within the main file called "target.html".

<html>
<head>
<title> test page (contents of frame)</title>
</head>
<body style="overflow-x:hidden;overflow-y:scroll;">
wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide wide widewide wide wide wide wide wide wide wide wide wide wide wide wide wide widewide wide wide wide wide wide wide wide wide wide wide wide wide wide widewide wide wide wide wide wide wide wide wide wide wide wide wide wide widewide wide wide wide wide wide wide wide wide wide wide wide wide wide wide
</body>
</html>

johneva
04-23-2006, 01:01 PM
Hia

Did ya get it working then?

Thanx John

zog953
04-23-2006, 01:04 PM
for some reason it just inserts the scroll bar in to the page

<a href="http://photobucket.com" target="_blank"><img src="http://i59.photobucket.com/albums/g293/zog953/scrollproblem.jpg" border="0" alt="Image hosting by Photobucket"></a>

i just wanna get rid of the one at the bottom of the frame window

johneva
04-23-2006, 01:05 PM
Yeah thats what it should have done.

If you give me the URL for the page I will sort it for ya.

zog953
04-23-2006, 01:05 PM
http://i59.photobucket.com/albums/g293/zog953/scrollproblem.jpg

zog953
04-23-2006, 01:06 PM
its not live yet, shall i see if i can load it onto geocities?

johneva
04-23-2006, 01:16 PM
Ah right.

Yeah its upto you if you want me to look at it.

By the way there is a better way than using an iframe anyway depending on your needs.

I dont know what your using the iframe for but 99% of the time using a scrollable div is a much better option anyways.

Link to scrollable div tutorial. (http://www.fourlevel.com/nimbus/textarea/scrollable3.htm)

zog953
04-23-2006, 01:23 PM
http://uk.geocities.com/linq_distribution/products.html

cool thanks, i will have a look at that in a sec

zog953
04-23-2006, 01:25 PM
sorry forgot to mention click on the Q10 link

johneva
04-23-2006, 01:42 PM
Yeah sound I knew that matey.

But thats it I give up I dont know why it is doing it.

Firefox even does it as you want it without doing the style change I told ya to do.

It could be down to something else in your pages coding but I dont know I dont have time to mess around with it to much sorry and my coding skills are far from the best.

One of the others may be able to tell ya why it is doing this but I dont know anymore sorry.

zog953
04-23-2006, 01:44 PM
ok, well thank you very much for your help! i'll keep going with this and see how i get on.