Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fixed floating elements

Featured Replies

Hey there,

 

New to the forums so this is my first post (bar my hello in the introduction section)...

I have a problem with a fixed floating element I've setup curtesy of a Remy Sharp tutorial - http://jqueryfordesigners.com/fixed-floating-elements/

 

I'm in desperate need to get a slight modification added to it. Basically my form is slightly taller and I have a footer running along the bottom, so on smaller monitors the form overlaps the footer as it has a position:fixed property applied to it.

 

Check it out for your selves: http://bit.ly/bRMEnU

 

Does anyone know of a way to apply a class to a div once it's reached the bottom of it's container?? That way I can apply position:absolute bottom:0 to it so it doesn't encroach on the footer?

 

Any help would be much appreciated!!!

 

Cheers

You probably need the second type of "sticky footer" which doesn't use position: fixed. It stays at the bottom of a page which has little content above, but stays below the content if there is a lot of content and you scroll to see it. Look at http://www.cssstickyfooter.com/

  • Author

Unfortunately mate I've tried that, it doesn't work. The thing is the form has position:fixed applied, so it's out of the flow of the document so the footer doesn't even know it's there.

 

I basically have to figure out a way to apply position:bottom, and replace position:fixed, once it reaches the bottom of its containing div.

 

I'm beginning to think it's impossible! Although Apple have done it...

 

http://store.apple.com/uk/configure/MC511B/A?mco=MTg1ODMzNDk

 

If you reduce the height of your browser and then scroll up and down you can see the summary and spec box fix to the bottom of the container (when at the bottom of the page). Check out the source, they use a duplicate of the summary and spec boxes that's hidden. Then when they reach the bottom the boxes that have scrolled down disappear and the one positioned at the bottom appears, giving the illusion the original boxes stop scrolling.

 

I just can't figure out how exactly they do it... :-s

Unfortunately mate I've tried that, it doesn't work. The thing is the form has position:fixed applied, so it's out of the flow of the document so the footer doesn't even know it's there.

 

I basically have to figure out a way to apply position:bottom, and replace position:fixed, once it reaches the bottom of its containing div.

 

I'm beginning to think it's impossible! Although Apple have done it...

 

http://store.apple.c...mco=MTg1ODMzNDk

 

If you reduce the height of your browser and then scroll up and down you can see the summary and spec box fix to the bottom of the container (when at the bottom of the page). Check out the source, they use a duplicate of the summary and spec boxes that's hidden. Then when they reach the bottom the boxes that have scrolled down disappear and the one positioned at the bottom appears, giving the illusion the original boxes stop scrolling.

 

I just can't figure out how exactly they do it... :-s

 

lokks like they are using javascript

  • Author

lokks like they are using javascript

Yeah, that's the problem... I'm more of a designer but fluent in CSS and HTML... I know how to get jQuery plugins to do what I want, but that's about as far as my js goes. So, here I am... any ideas on how to replicate the effect??

  • Author

Yeah, it's actually in a wrapper... although I just played with the css but no luck. overflow:hidden doesn't even hide the form when it passes beyond the wrapper.

 

It's like the terminator or something!! :-)

"Sticky footer" which doesn't use position: fixed. It stays at the bottom of a page which has little content above, but stays below the substance if there is a lot of substance and you scroll to see it. Look at

unluckily mate I've tried that, it doesn't work. The thing is the form has position fixed enforced, so it's out of the flow of the document so the footnote doesn't even know it's there.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.