473,385 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Style on Div to avoid horizontal scrolling


Hi,

Is it possible to have only vertical scrolling enabled on a DIV?

style="BORDER:1px ; OVERFLOW: auto; WIDTH:799px; HEIGHT:249px;position:
absolute; top:0; left:0; "

will have both horizontal and vertica scrollbars once the dim of the content
exceeds the DIV's size.

Can it be made so only vertical scrollbars will appear?

TIA,

Tom
Jul 23 '05 #1
5 5870
Ivo
"Tom Szabo" wrote
style="BORDER:1px ; OVERFLOW: auto; WIDTH:799px; HEIGHT:249px;position:
absolute; top:0; left:0; "

will have both horizontal and vertica scrollbars once the dim of the content exceeds the DIV's size.
Can it be made so only vertical scrollbars will appear?


Sure. Even without resorting to javascript. IE5 and up allow independent
setting of the properties with overflow-x and overflow-y, see for example
< http://www.blooberry.com/indexdot/cs.../overflowx.htm >

You could also try wrapping your content in an 'inner div' which is set to
be slightly narrower than the 'outer div'.
--
Ivo
http://www.vansandick.com/
Jul 23 '05 #2
Ivo wrote:
Sure. Even without resorting to javascript. IE5 and up allow independent
setting of the properties with overflow-x and overflow-y


Which (a) are not CSS and (b) won't work in browsers other then IE.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3


David Dorward wrote:
Ivo wrote:

IE5 and up allow independent
setting of the properties with overflow-x and overflow-y

Which (a) are not CSS and (b) won't work in browsers other then IE.


These properties are part of CSS 3 (currently a working draft
http://www.w3.org/TR/2002/WD-css3-box-20021024/ ) and recent Mozilla
trunks versions implement them.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #4
comp.lang.javascript FAQ - http://jibbering.com/faq
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:41***********************@newsread2.arcor-online.net...


David Dorward wrote:
Ivo wrote:

IE5 and up allow independent
setting of the properties with overflow-x and overflow-y

Which (a) are not CSS and (b) won't work in browsers other then IE.


These properties are part of CSS 3 (currently a working draft
http://www.w3.org/TR/2002/WD-css3-box-20021024/ ) and recent Mozilla
trunks versions implement them.


And in the meantime, while you're waiting for standards to shake out, if
you want something that works in IE (and possibly Opera 7) and
Gecko-based browsers, you can try:

overflow-x:hidden;overflow:-moz-scrollbars-vertical;

--
Grant Wagner <gw*****@agricoreunited.com>

Jul 23 '05 #5
Martin Honnen wrote:
David Dorward wrote:
Ivo wrote:
IE5 and up allow independent
setting of the properties with overflow-x and overflow-y Which (a) are not CSS and (b) won't work in browsers other then IE.


These properties are part of CSS 3


They are *not*, since
(currently a working draft
http://www.w3.org/TR/2002/WD-css3-box-20021024/ )
| This draft should not be cited except as "work in progress." It is a work
| item of the CSS working group which is part of the Style activity (see
| summary). It may be modified or dropped altogether at any point in time.
| Implementations for the purpose of experimenting with the specification
| are welcomed, as long as they are clearly marked as experimental.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ and recent Mozilla trunks versions implement them.


,-<ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/README>
|
| This directory contains precompiled binaries of Mozilla.
| These are NIGHTLY BUILDS. They are completely untested.
| We don't even know if they start up without crashing.
| They expire in 30 days.

When will they ever learn?
PointedEars
--
Reboot is not a debugging technique...
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mr_burns | last post by:
Hi, Is it possible to disble horizontal scrolling using CSS? I want to try and use two backgrounds, one tiling vertically and part of the body background, which will not force scrolling, but one...
4
by: anna | last post by:
How to tell if a horizontal scrollbar is present? I only want to use scrollTo if horizontal scrollbar is present. window.scrollbars.visibility doesn't specify which scrollbar is present, so it...
2
by: Just D. | last post by:
Does anybody know how to disable the horizontal scrolling on ASPX form? What JAVA script should be used for that? The standard methods don't help and I'm looking for some JAVA function to fire it...
5
by: delraydog | last post by:
I'm creating a dynamic iframe element: var iframe=document.createElement("iframe"); I want attach a style to the element, overflow-x:hidden. However, I can not find a way to do this via...
14
by: Dave | last post by:
My web site is not particularly theme-based, but it contains an Art Gallery I'd like to display in a different perspective. I would like to horizontally scroll it, rather than vertically - as if...
3
by: sumit | last post by:
Hi, I made a data grid vertically as well as horizontal scrollable as number of columns are very large!! But when i scroll horizontally then header is not visible as it also gets scrolled...
0
by: Dan Hinsley | last post by:
I just got one of the new Microsoft Mice that has a "tilt wheel" for horizontal scrolling. This works in a listbox in my VB.NET app, but doesn't work for a datagrid that does have a horizontal...
3
by: j0rd4n | last post by:
I have a user control that needs to allow vertical scrolling but not horizontal scrolling. In the user control's resize event, I need to adjust the size of all the children controls. For this to...
16
by: howa | last post by:
Is relative style design, e.g. relative font-size: em, % obsolete now? since most modern browsers now support automatic zoom in/out, even you are using fixed font-size.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.