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.

Stretching a DIV to the bottom of the page

Featured Replies

Hello ...

 

I'm wondering whether anyone can offer advice. I'm currently working on a site (early stages), and struggling to get the main container div to stretch right down to the bottom of the screen.

 

Here's a link to my current draft index page, to show what I mean. None of the links on the page work, and it's still rough, just so you know:

 

http://doverbroecks.com/tomp/index.html

 

Basically, I want to make the main content box continue to the very bottom of the screen, not to finish just 5-10px before the end. It's probably something simple I'm missing ...

 

Thanks very much ...

  • Author

Hi Bluedreamer ...

 

Thanks for replying, and for the welcome ... I've just realised that this issue doesn't rear its head in the same way when I look at the page in Firefox (I'd been in Safari, previously) -- Safari stretches the content area right to the bottom.

 

(And the Firefox version also seems to be 1px out of line ... So I have a few things to work at!)

 

What I've done, currently, is give the container div a height of 100% ... But I don't think this is quite right, as my page will always have a vertical scroll bar, however I resize the window it's displayed in. I believe this is because the div has a height of 100%, but does not start at the top of the page. So it's stretching *beyond* the bottom of the window, if that makes sense.

Looks like the right is 1 or 2px out. But use a background image like has been said, as long as the sidebar is a static width.

 

Hopefully CSS3 may make this sort of thing easier in the future.

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.