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.

2 css questions please if i may be so bold!

Featured Replies

hello all!

 

well i have two questions...

 

 

1) how do you repeat something along the top of the body and the bottom... for example. something like

 

body {

background:url/image.jpeg repeat-x top left;

}

 

will repeat the pic alway across the whole body, i understand this. but how do i do that with the bottom of the screen for a footer style pic across the body AS WELL?

 

(maybe a bad way of explaining, but i hope you get what i mean? an example of this, is on this website link where the top and bottom spans the whole page)

 

and

 

2)how do i make it, so that only the content of my website scrolls and the background stays in the same position? like for example i was looking at http://darrenpinder.co.uk/ and noticed that his background image stays in the same place, but the content scrolls. it's a nice trick.

 

i would really appreciate your help on this. thanks very much.

Hi,

 

1) To have a background image repeating top and bottom, simply have two divs one for the header and one for the footer, set each background to repeat-x. As long as you don't set a width or the divs are within another div with a set width then the background image will repeat the whole of the browser window.

 

2) Within the body or the div that contains the main background image add background-attachment: fixed;

 

 

Hope this helps

  • Author

wow thanks damian, that is so helpful. i really appreciate that mate!!!!

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.