Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To 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 April 9th, 2006, 12:19 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

IE and Firefox support two CSS properties called overflow-x and overflow-y, they are identical to the overflow property but provide control of overflow for the x and y axis seperatly.

Code:
    <head>
        <style type='text/css'>
            body, html {
                margin: 0;
                padding: 0;
                height: 100%;
            }
            div#wrapper {
                height: 100%;
                overflow: hidden;
                overflow-x: auto;
            }
        </style>
    </head>
    <body>
        <div id='wrapper'>

        </div>
    </body>
</html>
Beyond that, if cross-browser compatibility is important, your only option is to keep the height of the content smaller than the vertical boundaries (i.e. no vertical overflow), and set the value of the overflow property to "auto", and you'll get a horizontal scroll bar and no vertical scroll bar.

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old April 10th, 2006, 09:25 AM
Registered User
 
Join Date: Apr 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks =)

 
Old April 18th, 2006, 10:43 AM
Registered User
 
Join Date: Apr 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

HEllo, It's me again, I would like to know how to set the scrool bar to a fixed position? it's is possible ?

Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Browser window: Specifying the size and location? asearle HTML Code Clinic 2 November 22nd, 2007 08:50 AM
center text (only) in fixed size div, how to do it beetle_jaipur BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 April 16th, 2007 01:38 PM
Fixed size table amc Dreamweaver (all versions) 4 August 29th, 2004 07:03 AM
A fixed size Datagrid pbyrum General .NET 1 July 30th, 2004 09:56 PM
Fonts and Browser window size freaky al Dreamweaver (all versions) 5 October 5th, 2003 11:07 AM





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