Forum Moderators: not2easy

Message Too Old, No Replies

Float when I need to, but not on a small monitor

float function and how can it be changed? Firefox

         

sunsterv

4:22 pm on Mar 10, 2007 (gmt 0)

10+ Year Member



Hi folks, I have a question.

I have a nice hi res monitor. This is great when you're working on dreamweaver and it's monster menus, but I keep forgetting about those with smaller monitors. So, here's my question.

I have a submenu that is placed on the left hand side of my layout. It's underneath a biggish image, so you could say that the menu starts about half way down the page.

Okay, I've used the float function which means that this menu remains in exactly the same position on screen even if you scroll the page (ie, it 'floats' where everything else scrolls.)

This works great on my monitor, but, if I used a lower res screen then I wouldn't be able to see all of the menu. And even if I used the scroll bar the menu would resolutely stay put.

The question is, is it possible to have a menu (ie. a specified div area) that scrolls until it appears in it's entirely on the screen and then floats so that it is always visible if you are viewing a long page? In addition to this, if you had a very long menu which was taller than the screen, could you always let it scroll up and down so that you would never be without the lowermost links, or uppermost if you scrolled down too far?

It's a big ask I know, but I'm sure I've seem this somewhere somehow before?!?! Mind you, it could have been flash I was looking at.

Ta,

Sunster

cmarshall

8:09 pm on Mar 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, it's entirely possible; with JavaScript.

It's not an uncommon feature, and there are many examples of it. I won't post a link to one, because of the link posting guidelines, but it shouldn't be too difficult to find.

penders

9:22 pm on Mar 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Okay, I've used the float function which means that this menu remains in exactly the same position on screen even if you scroll the page (ie, it 'floats' where everything else scrolls.)

I'm curious as to know what 'the float function' is? Is this some JS that dreamweaver implements? Or your own function? It doesn't sound as if it is related to the standard CSS float property (float:left;), more like the behaviour of position:fixed ...? Thanks.

sunsterv

9:52 am on Mar 11, 2007 (gmt 0)

10+ Year Member



You're right, it is the fixed option in css. I suppose the way I see it is that when something floats, it rises above everything else whereas everything else moves in tandem. So yes, apologies there, it's the fixed function.

Sunster

Ingolemo

2:44 pm on Mar 11, 2007 (gmt 0)

10+ Year Member



It's generally a good idea not to call that the "float" function around here because "float" has an entirely different meaning in CSS and it'll just make everyone confused. :)