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.

FOOTERS

Featured Replies

style.cssindex.htmlHi all not been on here for ages so let me first start by saying i do appreciate your help.

 

Ok ive been working on a footer for my website for sometime trying to get the perfect one, but one problem i keep running into is positioning. I want a big fat footer that stuck to the bottom of the window but also scrolls with the rest of the content. I did initially go for a position: fixed footer but decided best to have a relative footer instead as this fits in with the rest of my site. The problem is when i try to have the footer span the whole width of the browser window. With fixed its ok but with relative it aint & i consider myself very css savvy But this annoyingly not working. PLEASE! help?

;

With relative it just decreases in size & looks like it has 0 auto set to it.. which i aint.

 

Thanks

Edited by MixCreations

You've set the <body> element to have a width of 952px. Naturally, since your footer element is a child of <body> and it has a width of "100%", it will only expand to the width of it's parent (body). When an element's position is "fixed", this is not it's behavior, which is why you didn't have the issue then.

 

You'll find that many don't set the dimensions of the body tag. Instead, they create a "wrapper" div and place all necessary content within it. Then, if they need anything to extend the width of the body (what you need), they'll place that content outside of the wrapper (ex. your footer). This is the perfect solution to your issue.

 

Kind Regards

Edited by Pete Prosper

  • Author

You've set the <body> element to have a width of 952px. Naturally, since your footer element is a child of <body> and it has a width of "100%", it will only expand to the width of it's parent (body). When an element's position is "fixed", this is not it's behavior, which is why you didn't have the issue then.

 

You'll find that many don't set the dimensions of the body tag. Instead, they create a "wrapper" div and place all necessary content within it. Then, if they need anything to extend the width of the body (what you need), they'll place that content outside of the wrapper (ex. your footer). This is the perfect solution to your issue.

 

Kind Regards

 

Thanks plus i did work it out after.

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.