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.

Scroll bars and divs

Featured Replies

Hi there,

 

I am hoping there is someone there who can give me some help??

 

I have started a site in divs, which I haven't used before so please bear with me - its all new!

 

I started this sometime ago then had to go off and do some other projects so I've come back to it now and I can't figure something out.

 

I've made up the page by using includes in divs - but I need to be able to contain everything within one overall 'container' which will give me scroll bars - as at the minute if you reduce the size of the window the scroll bars only go as far at the main content area, and completey miss the black news area at the bottom.

 

Does anyone have an idea of how to do this as I'm really confused - I've tried just sticking everything into another div but i doesn't seem to work.

 

Thanks in advance for your help x

 

View my site

I've made up the page by using includes in divs - but I need to be able to contain everything within one overall 'container' which will give me scroll bars - as at the minute if you reduce the size of the window the scroll bars only go as far at the main content area, and completey miss the black news area at the bottom.

 

I'm not entirely sure what it is you want, but if I think you mean what you mean, then put this CSS to your div

overflow: auto;

 

This will make the div that you choose, when over-filled, use a scrolling system. So give it a set height, too.

 

I hope I haven't just told you something useless :)

  • Author

Thanks so much - thats great I now have my scroll bars thanks.

 

Just one thing... The footer area now moves with the scroll and I can't figure out how to fix it.

 

view test page

 

The grey bottom area of the site is made up of 3 divs

 

#leftfooter {

position: absolute;

left: 0px;

top: 729px;

width: 200px;

height: 200px;

color: #000;

background-color: #1e1e1e;

overflow: hidden;

}

 

#mainfooter {

position: absolute;

left: 200px;

top: 729px;

width: 500px;

height: 200px;

background-color: #1e1e1e;

overflow: hidden;

}

 

#rightfooter {

position: absolute;

left: 700px;

top: 729px;

width: 300px;

height: 200px;

color: #000;

overflow:hidden;

background-color: #1e1e1e;

}

 

In these 3 areas I've got another div - for example in the center 'mainfooter' there is

 

#footercentercontainer {

position: fixed;

top: 750px;

left: 225px;

width:450px;

height: auto;

font-family: Arial, Helvetica, sans-serif;

font-size: 11px;

color: #fff;

background-color: #1e1e1e;

z-index:5000;

}

 

 

I'm thinking its probably the position fixed thats mucking it up, but if I change that to absolute the text dissapears completly.

 

Can anyone help?

I'm thinking its probably the position fixed thats mucking it up, but if I change that to absolute the text dissapears completly.

 

 

Generally you don't want to be using "position: fixed;", useful as it is, it's not supported by IE (the most annoying thing known to web design) which some 80% of the population still use, so :rolleyes:

 

What text disappears when you make it position: absolute; ? There is no text in the footer? Perhaps mess around with z-indexing http://www.echoecho.com/csslayers.htm

 

Hope that helps

  • Author

Does anyone know of a good place to find an explaination of tags like fixed - absolute etc? I'm really getting fed up - might have to go back to tables - at least I knew how they worked!

  • Author

Wooo hoooo - thanks sooo much - finally figured it out.

 

It was the fact that ther absolute position was relative to the container the div was help in that was getting me - I thought it was always just relative to the page. No wonder things were didapearing they were so far away I'd have had to send out a search party to find them.

 

Thanks very much you're brilliant!!!

 

Test Page

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.