Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'overflow=hidden' doesnt work... help needed

Status
Not open for further replies.

baad

Programmer
Apr 10, 2001
1,481
RU
Hi all!
I have a <div> & it's much wider than window width (smth like 1400px) there i've got a 'slidin' images. Well, this div has a property 'overflow=hidden' and it should clip its content by window size. (or not?) But it doesnt takin any effect...
What is my problem?
 
it shuld clip its contents to its size, not the viewport's size. Try making the body's overflow attribute hidden, and/or removing scrollbars... jared@eae.net -
 
The only way I've seen this working is with a pair of nested <div>s. The outer one is a bounding box for the inner one. Set it's height and width accordingly. In the inner one put everything you want to see. Set the overflow attribute of the outer layer to hidden. You may need to add this to the outer one too:

clip:rect(0,x,y,0)

Where x and y are the height and width of your outer layer. If you want this to work in Netscape you'll need to put all this in a style sheet at the top of the page instead of in the <div> tag itself.

Off the top of my head I think that should work. If it doesn't let me know.
 
style=&quot;overflow: hidden&quot; will work like jaredn said but only in IE I think. Klae{/color]

You're only as good as your last answer!
 
I'm trying do the same kind of thing but it's a table in a DIV that's only 510px wide, so the scrolling sideways thingy isn't a problem. The &quot;overflow:scroll&quot; all works perfectly in IE4/5 and 5.5. But doesn't work at all in NN. Checking CSS syntax libraries, it doesn't look like overflow is supported by Netscape at all.

Does anyone have any ideas how I could re-create a scrolling table in a small part of the screen in Netscape without using framesets?

TIA,

Scooter
 
Hi guys! Thunx for responding!
Well, my problem is:
'overflow:hidden' works like i said (just like i want it to: clip its contents by viewport's (window) size) but only in MSIE 5.0 Win98, but it doesnt on Mac...

>jaredh: 'Try making the body's overflow attribute hidden, and/or removing scrollbars...'

removin scrollbars - it's not for me... (i wuld need 'em & so i dont want 2 add/remove 'em each time...)

thunx 2 hotmadras for the idea - i wuld shure try to do it.
and as long as NN doesnt support 'overflow' method, i shuld use 'clip' for cross-brouser realisation.

best regards, vic
 
hey its not my fault jus becasue my screen name is overflow......loll
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top