|
Subject:
|
Disabling "Horizontal Scrollbar" in <iframe>
|
|
Posted By:
|
mcinar
|
Post Date:
|
3/16/2005 8:21:40 AM
|
Hi All,
I am trying to disable the "Horizontal Scrollbar" in <iframe>. I used the following code, but id didn't work.
<div id="billing_instruction" width="950px" style="position:absolute; z-index:13; left: 10px; top: 200px;"> <iframe frameborder="1" name="content" width=950px height=80px marginheight=0 marginwidth=1 style="overflow-x:hidden; overflow-y:auto;" src="display_billing_instruction.asp?Corp_ID=<%=lngCorpID%>&Bill_Instruction=<%=server.URLEncode(strBillingInstruction)%>"> </iframe> </div>
Is it maybe related with "scrolling" option in <iframe>? You can either make it "yes" or "no". Only problem is that, if you make it "no", then both Scrollbars are not available.
Thanks for your help,
MCinar

MCinar
Love all the creatures because of the creator.
|
|
Reply By:
|
ciderpunx
|
Reply Date:
|
3/16/2005 10:18:14 AM
|
AFAIK the style="overflow-x:hidden; overflow-y: auto" should be in the body element of the iframe contents. Let me know if that helps you...
Charlie
-- Don't Stand on your head - you'll get footprints in your hair. http://www.charlieharvey.org.uk
|
|
Reply By:
|
mcinar
|
Reply Date:
|
3/16/2005 10:47:17 AM
|
Hi Charlie,
What do you mean the body element of the iframe contents? Can you show me a sample?
Thank you,
MCinar
Love all the creatures because of the creator.
|
|
Reply By:
|
crmpicco
|
Reply Date:
|
3/16/2005 10:55:48 AM
|
example:
<iframe src="../VOLAROCLICKWRAP15.pdf" width="600" height="600" scrolling="no" name="content" class="body"></iframe>
Picco
www.crmpicco.co.uk www.crmpicco.co.uk.tt www.milklemonadechocolate.uk.tt www.griswolds.uk.tt
|
|
Reply By:
|
mcinar
|
Reply Date:
|
3/16/2005 11:29:16 AM
|
Hi Picco,
I tried the following, but it still doesn't work. <style> BODY { overflow-x:hidden; overflow-y:scroll; } </style>
<iframe frameborder="1" name="content" width="950px" height="80px" marginheight="0" marginwidth="1" scrolling="no" class= "body" src="display_billing_instruction.asp?Corp_ID=<%=lngCorpID%>&Bill_Instruction=<%=server.URLEncode(strBillingInstruction)%>"> </iframe>
Thanks for your help,
MCinar
Love all the creatures because of the creator.
|
|
Reply By:
|
mcinar
|
Reply Date:
|
3/16/2005 11:48:10 AM
|
I have another question regarding to <iframe>. There are three columns in <iframe> and the last column is a "Comment' field. If it doesn't fit in a cell, it pushes the other two colums to the left, rather than wrapping itself within the same cell. Here is my code;
<div id="authorized_user_title2" width ="950px" style="position:absolute; left: 10px; top: 305px;"> <table width ="950px" border="0" rules="NONE"> <thead style="background-color:#000099; color=#FFFFFF; text-align: center; font-family: verdana; font-size: 11;"> <tr> <tr> <th width="175x">FIRST NAME</th> <th width="175px">LAST NAME</th> <th width="600px">COMMENT</th> </tr> </tr> </thead> </table> </div> <div id="authorized_user" width ="950px" style="position:absolute; left: 10px; top: 325px; wrap:yes"> <iframe frameborder="1" name="authorized_user" width="950px" height="80px" marginheight="0" marginwidth="1" scrolling="yes" src="display_authorized_user.asp?Corp_ID=<%=lngCorpID%>"> </iframe> </div>
----------- Source Page: display_authorized_user.asp ------------------ <% sub display_authorized_user(rs) %><table width="920px" cellspacing="0" cellpadding="0" border="1"> <%intCount = 0 do while not rs.eof if (intCount mod 2) = 0 then%> <tr valign="top" class="tdleft" bgcolor="#ffffff"> <%else %> <tr valign="top" class="tdleft" bgcolor="#dddddd"> <%end if intCount = intCount + 1 call display_detail(rs)%> </tr> <%rs.movenext loop%> </table> <%end sub%>
<%sub display_detail(rs)%> <td width=172px class=td2> <%= trim(FORMAT_FROM_DB(rs("First_Name_VC")))%> </td> <td width=175px class=td2> <%= trim(FORMAT_FROM_DB(rs("Last_Name_VC")))%> </td> <td width=573px class=td2> <%if len(trim(rs("Comment_VC"))) > 0 then Response.Write trim(FORMAT_FROM_DB(rs("Comment_VC"))) else Response.Write " " end if%> </td> <%end sub%>
Thanks,
MCinar
Love all the creatures because of the creator.
|
|
Reply By:
|
ciderpunx
|
Reply Date:
|
3/27/2005 6:18:05 PM
|
Hi MCinar - Sorry for the late reply - I've been off climbing hills for a bit.
What I was meaning is probably best illustrated in code:
[file == tmp0.html]
<html> <head> <title> test page (contents of frame)</title> <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>
[file == tmp1.html] <html> <head></head> <body> <iframe src="tmp0.html" width="100%" height="5%"></iframe> </body>
This works in firefox && galeon on Linux - unfortunately I don't have IE at home, so I can't test it on that (and IE's CSS implementation is fairly sketchy in places, so this may well not work).
My initial guess on the second question is that your <th> s add up to 950 pixels, but your table is 920px wide.
HTH
charlie
-- Don't Stand on your head - you'll get footprints in your hair. http://www.charlieharvey.org.uk
|
|
Reply By:
|
mcinar
|
Reply Date:
|
3/27/2005 9:29:02 PM
|
Hi Charlie, I tested your code and it works very well.
Thanks for your help,
MCinar
Love all the creatures because of the creator.
|
|
Reply By:
|
livshin
|
Reply Date:
|
11/5/2006 8:03:38 AM
|
Hi, I had the same problem, but I could not change the code for the iframe (it was an external page). What I eventually did was to set the height of the iframe to 103% and this way hiding the scrollbar at the bottom. I know this might cause problems depending on the resolution used etc, but it's the only way that worked for me. You can see an example of my iframe at: www.poly-phone.com/index.php
|