473,624 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help w/ pos:fixed; overflow:scroll

Dear group,

I wanted to make a scrollable list-menu that is fixed in place and fitted to the height of the browser window, so I tried:

ol#nav{ position: fixed; top: 2em; bottom: 0; height: auto; left: 0; width: 12em; right: auto; overflow: scroll;
}

Or should I set the menu-list's parent DIV to "position: fixed; overflow: scroll" instead?

Any tips?

thank you! -- ingrid
Jul 20 '05 #1
3 7019
Ingrid wrote:
I wanted to make a scrollable list-menu that
is fixed in place and fitted to the height of
the browser window, so I tried:

ol#nav{
position: fixed;
top: 2em; bottom: 0; height: auto;
left: 0; width: 12em; right: auto;
overflow: scroll;
}


I'm not sure what you want; perhaps you want height: 20em;
overflow: scroll?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2
>I'm not sure what you want; perhaps you want height: 20em; >overflow:scrol l?Hi Brian! Thanks for the reply.I was thinking that {position: fixed; top: 0; bottom: 0; height: auto;overflow: scroll;} would make a fixed, scrollable list that is exactlyas tall as the browser window:http://www1.asstr.org/~ingrid/joesguide-authors.html-- warning! slightly naughty text content (but no pictures)In Camino, I can get the effect I want by applying those rules("position : fixed; overflow: scroll;...") to the list itself or to theDIV that contains the list; I don't know if there's any advantage todoing it one way versus the other.I'm a little worried that it might not show right in old and sloppybrowsers.
Jul 20 '05 #3
Ingrid wrote:
I was thinking that {position: fixed; top: 0; bottom: 0; height: auto;
overflow: scroll;} would make a fixed, scrollable list that is exactly
as tall as the browser window:

http://www1.asstr.org/~ingrid/joesguide-authors.html
Works in Firefox 0.8/Win xp.
In Camino, I can get the effect I want by applying those rules
("position: fixed; overflow: scroll;...") to the list itself or to the
DIV that contains the list; I don't know if there's any advantage to
doing it one way versus the other.
If you'd like, put up a test case with the alternate approach, and let
us Windoze users try them both.
I'm a little worried that it might not show right in old and sloppy
browsers.


Your worries are well-founded with position: fixed. Many browsers
choke on it. Hide it from Netcape 4 and IE 4 using @import; hide it
from IE 5-6/Win by using a child selector; if there are links in the
list, then also hide it from IE 5/Mac using @media.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4

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

Similar topics

3
11452
by: Emil Dotchevski | last post by:
I have a table that is at 100% width, which contains a <TD> that is 80% of that. In the <TD> I want to put pre-formatted text (the output from a C++ compiler, to be more precise) and I'd like the text to use scroll bars if it does not fit. I can't get this to work, no matter what combination of <PRE>, width, and style I try. Any help greatly appreciated. Thanks, Emil
1
2456
by: Frances Del Rio | last post by:
don't know if I'll succeed, have spent a lot of time already trying to figure this out: I would like to position a footer (co. name, address, etc..) at the bottom of browser page, in such a way that it's always at the bottom no matter how high the screen is ('clientHeight' in browser model) and that stays there when user scrolls.. in the "official" CSS specif's (http://www.w3.org/TR/REC-CSS2/visuren.html#fixed-positioning) I found this:...
4
134383
by: justdummy | last post by:
Hi, I am struggling with a problem for sometimes. I need to display a table in a html and if the height of the table goes beyond 200 px then a vertical scrollbar should alone appear without any horizontal scroll bar. If the height of the table is less than 200 px then no scroll bars should appear. Here is the html below. I tried to wrap the table around a <div> tag but its doesn't work out as the scroll bar appear close to the scroll bar...
4
12105
by: Marshal Antony | last post by:
How to add a vertical scroll bar to a CheckBoxList Server control in ASP.NET. Any help is appreciated. Thanks, Marshal Antony
8
1782
by: Alejandro Penate-Diaz | last post by:
I have a datagrid inside a table and I want to fix both (table and databrid) width to 700, but when the content of datagrid is too large the width increases automatically sometimes and sometimes not. Please need help with that. Thanks, Alejandro.
6
1684
by: isaac2004 | last post by:
hi am making a webpage for a client that has a lot of text on thier site, i have a photoshop template that i created and i want the text to fit in a small part of template, can anybody point me in the direction of a quick scroll bar that doesnt have any bells and whisltes, thanks for the help
9
3989
by: mevryck | last post by:
Greetings I have a huge Javascript with inclusion of external scripts and all. I got this by doing a XSLT . Now I have the contents in a Javascript variable, but I'm not able to update the element with the javascript contents. But when viewed as a seperate HTML file with the below contents I'm able to see the milonic menu http://www.milonic.com . <div>
4
2276
by: justml | last post by:
hy , i'm new in the webdesign domain. and i need a code to change the defaul color (blue) of a scroll bar into dark colors: this is the code: <div align="left" style="width:697px;height:577px;overflow-y:scroll"> can you help me ? Scuze me about my english..
9
3059
by: Stan Brown | last post by:
I've searched Google and the group archives, and came up empty, but maybe I just haven't selected the right search term. This concerns only the screen -- printing isn't an issue. I'm also not concerned about the appearance of the page in IE6 as long as the page is still usable. I want to have two pseudo-frames, using only CSS and no JS. The top "frame", 4em high, is a menu, and I want it to stay at the top of the viewport. The rest...
0
8246
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.