Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2005, 09:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default Disabling "Horizontal Scrollbar" in <iframe>

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=<%=ln gCorpID%>&Bill_Instruction=<%=server.URLEncode(str BillingInstruction)%>">
    </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.
__________________
MCinar

Love all the creatures because of the creator.
 
Old March 16th, 2005, 11:18 AM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
 
Old March 16th, 2005, 11:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
 
Old March 16th, 2005, 11:55 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

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
 
Old March 16th, 2005, 12:29 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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=<%=ln gCorpID%>&Bill_Instruction=<%=server.URLEncode(str BillingInstruction)%>">
        </iframe>

Thanks for your help,


MCinar

Love all the creatures because of the creator.
 
Old March 16th, 2005, 12:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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=<%=lngCor pID%>">
</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 "&nbsp;"
                end if%>
    </td>
<%end sub%>


Thanks,


MCinar

Love all the creatures because of the creator.
 
Old March 27th, 2005, 07:18 PM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
The Following User Says Thank You to ciderpunx For This Useful Post:
 
Old March 27th, 2005, 10:29 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Charlie,
I tested your code and it works very well.

Thanks for your help,

MCinar

Love all the creatures because of the creator.
 
Old November 5th, 2006, 09:03 AM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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






Similar Threads
Thread Thread Starter Forum Replies Last Post
<table> not displaying because of <iframe> crmpicco HTML Code Clinic 16 October 6th, 2007 04:46 PM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
disable horizontal scrollbars in <iframe> crmpicco HTML Code Clinic 5 February 28th, 2005 11:21 PM
How to use css with <iframe frameBorder="no"> bekim CSS Cascading Style Sheets 1 January 20th, 2005 08:57 AM
<iframe> problem cutesneakers PHP How-To 3 December 29th, 2004 02:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.