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.

Simple background image positioning

Featured Replies

Hi Guys

 

I'm new to web design and would appreciate your help.

I have a image that i wish to use in the background, it's a illustration of blades of grass and bees flying above it.

I want this image to stay at the bottom of the page at all times and be a set distance away from the page body. so when you scroll down this image scrolls down as well and page body doesn't scroll into this picture.

Also want to know how i can get this image to resize width ways so its stays in proportion on different monitors.

 

Thanks for your help in advance

I want this image to stay at the bottom of the page at all times and be a set distance away from the page body. so when you scroll down this image scrolls down as well and page body doesn't scroll into this picture.

That sounds as if you need a "sticky footer" This type

http://ryanfait.com/sticky-footer/

or

http://www.cssstickyfooter.com/

sticks to the bottom of the window if there isn't much content above, but if there is a lot of content above that fills the window height, the footer will stay below the content and you scroll to see it.

 

Also want to know how i can get this image to resize width ways so its stays in proportion on different monitors.

That sounds as if you need this tutorial:-

http://css-tricks.com/perfect-full-page-background-image/

which you could adapt for the footer only.

 

but whether you can use both tutorials to do what you want, I don't know. A position: fixed method will conflict with the sticky footer code.

That hack seems a bit too much. I thought you would be able to do it using:

 

body{

padding-bottom: 100px;

}

 

#footer{

width: 900px;

height: 100px;

position: absolute;

bottom: 0;

}

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.