homepage Welcome to WebmasterWorld Guest from 54.225.1.70
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
IE6/Mozilla and overflow-y
why why why
pixelkitty




msg:1213394
 5:44 am on Apr 26, 2003 (gmt 0)

I have the following div, that I want to only scroll vertically. No scrollbar should be visible at all horizontally.

.newscont {
width:350px;
height:330px;
overflow-y:scroll;
overflow-x:noscroll;
}

This works like a charm in IE/WIN but dies hard in Mozilla.

Does anyone have a solution?

 

pixelkitty




msg:1213395
 5:45 am on Apr 26, 2003 (gmt 0)

I think I should explain further.

In Mozilla, the above CSS removes all scroll bars and instead the div overflows instead of scrolling.

dmorison




msg:1213396
 7:33 am on Apr 26, 2003 (gmt 0)

Hi,

I think overflow-x and overflow-y are proprietary to IE.

Try:

.newscont {
width:350px;
height:330px;
overflow:auto;
}

Just did a quick test and this seems OK in IE6 and Mozilla/5.0. This will only display a scrollbar horizontally if your content overflows. I know you don't want horizontal scroll at all, but I think this is your best compromise. You won't see it if the content doesn't overflow.

Cheers.

pixelkitty




msg:1213397
 11:17 am on Apr 26, 2003 (gmt 0)

unfortunately, in mozilla, overflow:auto has a visible horizontal scroll bar no matter what the content or width.

which really sucks.

eg: newscont is 450px wide, a div inside is a max 300 including padding of 20px and margin of 10px, yet the scroll still shows horizontally.

Ive resigned myself to the fact that it cant be done.

rainborick




msg:1213398
 4:21 pm on Apr 26, 2003 (gmt 0)

This isn't an area I know very well, but can't you set the clip rect's width on your content sufficiently narrow to prevent all browsers from invoking their overflow property in a case like this?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved