Floating Menu/item inside box model page

Getting a menu to sit at a fixed position in the browser winder is easy enough by toggling the “fixed in Window” in the inspector. The menu will travel down the browser as you scroll down the page content.

like this: CSS Floating Menu

What if you’re build a fully inline page (box model) where the page content is centred using margins :auto and your menu is now sitting in something like an inline #div id='“left-col” where ideally is needs to be but only fix to the height to stay inside that box.

Simply selecting “fixed in Window” takes it out of the centred div and fixes it to the browser top/right using the co-ordinates on the box.

Are there any tips/tricks workarounds if any to make this scenario to work?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes. Make a parent for your fixed menu element that is 100% wide and fixed in window, then insert your menu element inline within that box and set its margins to Auto. This will give you a vertically-fixed, horizontally-centered layout element. Just remember that the fixed element will cover any links or other controls that happen to fall behind it, even though the menu won’t appear to cover them.

Walter

On Sep 17, 2012, at 11:52 AM, David Owen wrote:

Getting a menu to sit at a fixed position in the browser winder is easy enough by toggling the “fixed in Window” in the inspector. The menu will travel down the browser as you scroll down the page content.

like this: CSS Floating Menu

What if you’re build a fully inline page (box model) where the page content is centred using margins :auto and your menu is now sitting in something like an inline #div id='“left-col” where ideally is needs to be but only fix to the height to stay inside that box.

Simply selecting “fixed in Window” takes it out of the centred div and fixes it to the browser top/right using the co-ordinates on the box.

Are there any tips/tricks workarounds if any to make this scenario to work?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s the issue; if the menu with a parent at 100% and centred is in-front, it covers any main content links and if behind the content covers the menu links

Using z-index just the menu item does not appear to be working. Does z-index only work up to the parent container?

David

On 17 Sep 2012, at 16:55, Walter Lee Davis wrote:

This will give you a vertically-fixed, horizontally-centered layout element. Just remember that the fixed element will cover any links or other controls that happen to fall behind it, even though the menu won’t appear to cover them.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Each parent sets a new local scope for z-index. Each index is relative to its nearest parent element, in other words. If you want the menu to float above all other content, then it needs to be a direct child of the PageDiv, and probably in the last place in source order, too. You could try using the left:50%, margin-left: -[50% of the menu width]px trick, see if that lets you set it centered and fixed. You’ll need to break out the calculator for this, and I can’t recall if Freeway lets you set the Left in % using the Inspector. You may have to do this in the Extended dialog, relying on the fact that if you set an attribute there it will overwrite whatever you’ve entered in the Inspector.

Walter

On Sep 17, 2012, at 12:09 PM, David Owen wrote:

That’s the issue; if the menu with a parent at 100% and centred is in-front, it covers any main content links and if behind the content covers the menu links

Using z-index just the menu item does not appear to be working. Does z-index only work up to the parent container?

David

On 17 Sep 2012, at 16:55, Walter Lee Davis wrote:

This will give you a vertically-fixed, horizontally-centered layout element. Just remember that the fixed element will cover any links or other controls that happen to fall behind it, even though the menu won’t appear to cover them.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Before I check if this will work, is there a javascript method? Or would the same z-index issues apply?

David

On 17 Sep 2012, at 17:14, Walter Lee Davis wrote:

Each parent sets a new local scope for z-index. Each index is relative to its nearest parent element, in other words. If you want the menu to float above all other content, then it needs to be a direct child of the PageDiv, and probably in the last place in source order, too. You could try using the left:50%, margin-left: -[50% of the menu width]px trick, see if that lets you set it centered and fixed. You’ll need to break out the calculator for this, and I can’t recall if Freeway lets you set the Left in % using the Inspector. You may have to do this in the Extended dialog, relying on the fact that if you set an attribute there it will overwrite whatever you’ve entered in the Inspector.

Walter

On Sep 17, 2012, at 12:09 PM, David Owen wrote:

That’s the issue; if the menu with a parent at 100% and centred is in-front, it covers any main content links and if behind the content covers the menu links

Using z-index just the menu item does not appear to be working. Does z-index only work up to the parent container?

David

On 17 Sep 2012, at 16:55, Walter Lee Davis wrote:

This will give you a vertically-fixed, horizontally-centered layout element. Just remember that the fixed element will cover any links or other controls that happen to fall behind it, even though the menu won’t appear to cover them.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

JavaScript could be used to move the field out of the normal stacking order, but you’re just automating the HTML/CSS change that you could make in Freeway anyway, and forcing that change to happen each time the page loads, which is wasteful.

Walter

On Sep 17, 2012, at 12:23 PM, David Owen wrote:

Before I check if this will work, is there a javascript method? Or would the same z-index issues apply?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Fixed it…

Make the menu inline under the content on the freeway page all in a parent container. Then make the menu #menu-col position:fixed with the height set where the content starts in this case top:128px

http://www.printlineadvertising.co.uk/demo/fixed-menu/

No z-index needed.

David

On 17 Sep 2012, at 17:28, Walter Lee Davis wrote:

JavaScript could be used to move the field out of the normal stacking order, but you’re just automating the HTML/CSS change that you could make in Freeway anyway, and forcing that change to happen each time the page loads, which is wasteful.

Walter

On Sep 17, 2012, at 12:23 PM, David Owen wrote:

Before I check if this will work, is there a javascript method? Or would the same z-index issues apply?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Nice. For the record, I though you were trying to do something different – to center a fixed-position menu over the top of a centered page.

Walter

On Sep 17, 2012, at 12:44 PM, David Owen wrote:

Fixed it…

Make the menu inline under the content on the freeway page all in a parent container. Then make the menu #menu-col position:fixed with the height set where the content starts in this case top:128px

http://www.printlineadvertising.co.uk/demo/fixed-menu/

No z-index needed.

David

On 17 Sep 2012, at 17:28, Walter Lee Davis wrote:

JavaScript could be used to move the field out of the normal stacking order, but you’re just automating the HTML/CSS change that you could make in Freeway anyway, and forcing that change to happen each time the page loads, which is wasteful.

Walter

On Sep 17, 2012, at 12:23 PM, David Owen wrote:

Before I check if this will work, is there a javascript method? Or would the same z-index issues apply?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I haven’t read this thread thoroughly, but I have a fixed-window navigation
item on my cv-resume page:

http://portfolio.thebigerns.com/cv-resume/

The item is actually in-flow content in my inline structure page - fixed
with css thus:

#nav { position: fixed; float: left; width: 172px; margin-left: 20px;

margin-top: 40px; z-index: 100; }


Ernie Simpson

On Mon, Sep 17, 2012 at 12:44 PM, David Owen <
email@hidden> wrote:

Fixed it…

Make the menu inline under the content on the freeway page all in a parent
container. Then make the menu #menu-col position:fixed with the height set
where the content starts in this case top:128px

http://www.printlineadvertising.co.uk/demo/fixed-menu/

No z-index needed.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Very cool, except if you scroll all the way to the bottom, where it covers the links in the bottom.

Walter

On Sep 17, 2012, at 12:54 PM, Ernie Simpson wrote:

I haven’t read this thread thoroughly, but I have a fixed-window navigation
item on my cv-resume page:

Thebigerns.com

The item is actually in-flow content in my inline structure page - fixed
with css thus:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Added a bit of padding at the bottom - and a dose of smooth scroll to make more sense for the user.

http://www.printlineadvertising.co.uk/demo/fixed-menu/

David

On 17 Sep 2012, at 17:56, Walter Lee Davis wrote:

Very cool, except if you scroll all the way to the bottom, where it covers the links in the bottom.

Walter

On Sep 17, 2012, at 12:54 PM, Ernie Simpson wrote:

I haven’t read this thread thoroughly, but I have a fixed-window navigation
item on my cv-resume page:

Thebigerns.com

The item is actually in-flow content in my inline structure page - fixed
with css thus:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Work in progress, Walter :slight_smile:


Ernie Simpson

On Mon, Sep 17, 2012 at 12:56 PM, Walter Lee Davis email@hiddenwrote:

Very cool, except if you scroll all the way to the bottom, where it covers
the links in the bottom.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Can anyone suggest why the smooth scroll action disables the menu links after a scroll on iPad?

Nudging the page a little by hand activates the links again.

http://www.printlineadvertising.co.uk/demo/fixed-menu/

David

Sent from my iPad

On 17 Sep 2012, at 18:01, David Owen email@hidden wrote:

Added a bit of padding at the bottom - and a dose of smooth scroll to make more sense for the user.

http://www.printlineadvertising.co.uk/demo/fixed-menu/

David

On 17 Sep 2012, at 17:56, Walter Lee Davis wrote:

Very cool, except if you scroll all the way to the bottom, where it covers the links in the bottom.

Walter

On Sep 17, 2012, at 12:54 PM, Ernie Simpson wrote:

I haven’t read this thread thoroughly, but I have a fixed-window navigation
item on my cv-resume page:

Thebigerns.com

The item is actually in-flow content in my inline structure page - fixed
with css thus:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

David, I found this too. My research indicates its a known IOS issue and
I’ve found no workaround yet.


Ernie Simpson

On Mon, Sep 17, 2012 at 2:03 PM, David Owen <
email@hidden> wrote:

Can anyone suggest why the smooth scroll action disables the menu links
after a scroll on iPad?

Nudging the page a little by hand activates the links again.

http://www.printlineadvertising.co.uk/demo/fixed-menu/

David

Sent from my iPad


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Must be, your portfolio has the same issue.

David

Sent from my iPad

On 17 Sep 2012, at 19:07, Ernie Simpson email@hidden wrote:

David, I found this too. My research indicates its a known IOS issue and
I’ve found no workaround yet.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just when I though this is good to go IE spoils the party.

IE does not place the fixed menu 100px from the browser window top but 100px down from the parent div top

Does this need an IE conditional statement top: 0px or is something more solid be a fix?

 position:fixed; width:352px; overflow:visible; z-index:100; top:128px

David

Creative Design | Print Production | Web Design & Strategy | Domains & Web Hosting


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oops! so obvious - removing top: 128px fixes it in IE

David

Creative Design | Print Production | Web Design & Strategy | Domains & Web Hosting

On 25 Oct 2012, at 10:15, David Owen email@hidden wrote:

Just when I though this is good to go IE spoils the party.

IE does not place the fixed menu 100px from the browser window top but 100px down from the parent div top

http://www.printlineadvertising.co.uk/demo/fixed-menu/

Does this need an IE conditional statement top: 0px or is something more solid be a fix?

position:fixed; width:352px; overflow:visible; z-index:100; top:128px

David

http://www.printlineadvertising.co.uk

Creative Design | Print Production | Web Design & Strategy | Domains & Web Hosting


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options