What's the best way to force a div to extend to the bottom of a page?

1 Answer

Answer :

Hmmm… I typed up a big thing and then realized the whole thing is fluid. Fluid designs are one of those noble undertakings that rarely work out without a lot of thought and testing. Line lengths get too long or short, especially in multi-column designs and it tends to quickly become a mess of fringe cases. You may want to put some limits on the max and min width of the whole thing, but that’s a whole new can of browser support fun. Enough “If I were you…”, on to answer your question, I like this technique fairly well if you can have a footer with a specified height – http://fortysevenmedia.com/blog/archives/making_your_footer_stay_put_with_css/ The gist is that you have a clearing div that pushes content to the bottom (clear: both), then a negative margin to pull the footer back up. So if you have enough content to fill the window vertically it will just appear at the bottom of that. If not then it appears at the bottom of the browser window. Also, if you have no need of a footer, it can be a few pixels of background color and it should still force your containing div to go full height. I hope it helps and have fun.

Related questions

Description : The purple box ad just recently appeared on my Yahoo email account page. Is there a way to block or cancel it, using Firefox?

Last Answer : Try this trick, Yahoo purple box block.

Description : Is there any way to post a YouTube video to a Facebook Fan Page that can be played from within a Facebook Business Page?

Last Answer : no, at the moment you cant. the best you can do is place the youtube video link or upload a video from you pc. I dont know if they are going to fix that in the future though.

Description : Is there a way to remove a cached page from google?

Last Answer : answer:http://www.google.com/support/webmasters/bin/answer.py?answer=35306 The answer seems to be yes, if you put a meta tag in the header of your page.

Description : Tumblr code issue for DoinWork theme Utralite: this should be HTML basics but it's giving me some complicated problems with tricky between posts?

Last Answer : The above it has a bottom margin of 100 pixels, which is pushing it way down. I think you probably would want to transfer most or all of that bottom margin to the DIV the comments are supposed to go in.

Description : A question about CSS and DIV alignment?

Last Answer : answer:Drop a clear: both; on your div for the footer/bottom. #bottom { background:url(“images/bottom.png”) no-repeat scroll 0 0 transparent; clear:both; height:21px; position:relative; width:959px;

Description : Styling Multiple lines of text in a div?

Last Answer : You use HTML to structure the document. To tell the browser what is the point of each block of text. This is a heading , This is a paragraph , etc. You use CSS to tell the browser how each of ... : smaller; font-style: italic; } p.newsstory { font-face: courier } p.comment { font-size: smaller }

Description : DIV class & id name parser for automatic CSS file generation?

Last Answer : I saw something on reddit today about something called HSS, I can’t remember the link but google it, it sounded like it does what you want.

Description : How to position a div above another div while placed after that div? (see descr.)

Last Answer : I saw this the other day. Look for the fourth tip. Not sure if that is exactly what you want but you might want to take a look.

Description : How can I shrink a to its content, while still having it centered?

Last Answer : answer:Maybe you should try a instead of a div… that should shrink to it’s width by default. (Or you could give your div display:inline;). To make a div not stretch, I think you need to give it a width, in either px or %, but that doesn’t sound like what you want.

Description : Can I put a SPAN inside a DIV?

Last Answer : answer:Not sure if this will work (a demo page would be nice), but it often does. Add the following line to your CSS for .container: overflow: auto; Also note that you do not need to enclose them in a – you already have the element which is also inline as opposed to block-level like s.

Description : Div help?

Last Answer : answer:I got a page not found error. Check your link? EDIT…if you make it .html lowercase it works.

Description : CSS issue.

Last Answer : Hmm… not quite sure what you mean… whatever it is, I wonder if you’re taking the complicated option? It certainly seems like you are. Perhaps try simplifying your layout.

Description : Which equation will be true, if the medium is considered to be air? a) Curl(H) = 0 b) Div(H) = 0 c) Grad(H) = 0 d) Div(H) = 1

Last Answer : b) Div(H) = 0

Description : Which of the following identities is always zero for static fields? a) Grad(Curl V) b) Curl(Div V) c) Div(Grad V) d) Curl(Grad V)

Last Answer : d) Curl(Grad V)

Description : Find the correct relation between current density and magnetization. a) J = Grad(M) b) J = Div(M) c) J = Curl(M) d) M = Curl(J)

Last Answer : c) J = Curl(M)

Description : Choose the best relation. a) A = -Div(V) b) V = Curl(A) c) H = -Grad(V) d) V = Div(E)

Last Answer : c) H = -Grad(V)

Description : The relation between flux density and vector potential is a) B = Curl(A) b) A = Curl(B) c) B = Div(A) d) A = Div(B)

Last Answer : a) B = Curl(A)

Description : Find the Maxwell law derived from Ampere law. a) Div(I) = H b) Div(H) = J c) Curl(H) = J d) Curl(B) = D

Last Answer : c) Curl(H) = J

Description : Find the Maxwell equation derived from Faraday’s law. a) Div(H) = J b) Div(D) = I c) Curl(E) = -dB/dt d) Curl(B) = -dH/dt

Last Answer : c) Curl(E) = -dB/dt

Description : It cannot be determined from Gauss law, whereas the remaining options can be computed from Gauss law. 10. Gauss law for magnetic fields is given by a) Div(E) = 0 b) Div(B) = 0 c) Div(H) = 0 d) Div(D) = 0

Last Answer : b) Div(B) = 0

Description : If a function is said to be harmonic, then a) Curl(Grad V) = 0 b) Div(Curl V) = 0 c) Div(Grad V) = 0 d) Grad(Curl V) = 0

Last Answer : c) Div(Grad V) = 0

Description : The point form of Gauss law is given by, Div(V) = ρv State True/False. a) True b) False

Last Answer : a) True

Description : The curl of curl of a vector is given by, a) Div(Grad V) – (Del) 2 V b) Grad(Div V) – (Del) 2 V c) (Del) 2 V – Div(Grad V) d) (Del) 2 V – Grad(Div V)

Last Answer : b) Grad(Div V) – (Del) 2 V

Description : Identify the correct vector identity. a) i . i = j . j = k . k = 0 b) i X j = j X k = k X i = 1 c) Div (u X v) = v . Curl(u) – u . Curl(v) d) i . j = j . k = k . i = 1

Last Answer : c) Div (u X v) = v . Curl(u) – u . Curl(v)

Description : The Laplacian operator is actually a) Grad(Div V) b) Div(Grad V) c) Curl(Div V) d) Div(Curl V)

Last Answer : b) Div(Grad V)

Description : A CRO screen has ten divisions on the horizontal scale. If a voltage signal 5 sin 314t+45 deg)is examined with a line base settings of 5 msec/div, the number of cycles of signal displayed on the screen will be a) 0.5 cycles b) 2.5 cycles c) 5 cycles d) 10 cycles

Last Answer : Ans: 2.5 cycles

Description : What is the output of the following code AX = 37D7H, BH = 151 decimal DIV BH a) AL = 65H, AH= 94 decimal b) AL= 5EH, AH= 101 decimal c) AH= E5H, AL= 5EH d) AL= 56H, AH= 5EH

Last Answer : b) AL= 5EH, AH= 101 decimal

Description : IDIV and DIV instructions perform the same operations for? a) Unsigned number b) Signed number c) Signed number & Unsigned number d) none of above.

Last Answer : b) Signed number

Description : n 8086 microprocessor the following has the highest priority among all type interrupts. a) NMI b) DIV 0 c) TYPE 255 d) OVER FLOW

Last Answer : a) NMI

Description : Patient with Class II div I malocclusion has ANB of: A. +2 B. -2 C. +8 D. -8

Last Answer : C. +8

Description : The time/div and voltage/div axes of an oscilloscope have been erased. When a 1 kHz, 5V p-p square wave calibration pulse is connected to channel 1 ofthe scope the waveform observed on the screen ... channels are the same, the amplitude (pp) and period of the unknown signal are respectively.

Last Answer : The time/div and voltage/div axes of an oscilloscope have been erased. When a 1 kHz, 5V p-p square wave calibration pulse is connected to channel 1 ofthe scope the waveform observed on the screen is ... are the same, the amplitude (pp) and period of the unknown signal are respectively. 7.5 V, 2ms

Description : Do you get Page Not Found when you click on "View in itunes"?

Last Answer : Can you post the link you’re using to access iTunes? If don’t have it but if you have Firefox, try right-clicking on the ViI button, selecting Copy Link Location, and pasting it here.

Description : Why is my Tumblr page not showing up?

Last Answer : Did you edit your theme recently? I would try changing it to something else and see if that helps. And try a different browser too.

Description : Can't seem to load any page where I have to sign in, what could be the problem?

Last Answer : answer:It could be something as simple as resetting your privacy settings to default, or it could be something worse.. like a virus. We'd need a little more information to know for sure. [1] What ... up your system with CCleaner ? [5] Have you posted a Hijack This log on any computer forums yet?

Description : Should I have a separate blog for a band page?

Last Answer : Personally I would separate it because I think its better for band exposure.

Description : Why are the "most recent" and "top news" missing from my Facebook page?

Last Answer : You mean you expect the page to remain static? The gods of facebook can do whatever the hell they want to do with “your” page and they really don’t give a damn if you differ with them. Facebook is all about advertising and money.

Description : Why does Google display results that say: "These terms only appear in links pointing to this page" instead of just directly telling me where those links are?

Last Answer : I read somewhere that it could be that those other pages are actually past, cached pages of the current one you're now looking at. So there aren't actually other links, just previous (no ... has the information, but has changed the wording slightly to exclude that/those particular search term(s).

Description : How do you make a wikipedia page?

Last Answer : answer:The first step to learning to use Wikipedia might be to use Wikipedia to learn how to use Wikipedia. http://commons.wikimedia.org/wiki/Category:Instructional_videos_on_using_Wikipedia

Description : How do you add new websites to Chrome's "New tabs page."?

Last Answer : answer:I don't know about adding a website. My best guess would be open it a bunch of times until it appears. Maybe make it your home page a while. But once it appears, there is this: Make ... Customize the page to see the topic: http://www.google.com/support/chrome/bin/answer.py?answer=95451

Description : What SEO strategy brought you to first search results page?

Last Answer : Not coming from me, but someone else's experience.. they made effective use of keywords. On the majority of your pages within the website, have keywords or phrases that your demographic would type into a search ... your site is about & what it offers. Think of it like feng shui for web design. :)

Description : I would love my webpage to show up on google searches when using a certain keyword (not in the advertisement space), but i also don't want to change anything visible on the page. is there anything i can do?

Last Answer : meta tags, give this a read: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=79812

Description : How do I get mozilla firefox to display bookmarks on my toolbar with an icon related to the marked website instead of a blank page icon?

Last Answer : great question! i was wondering the same thing recently!!! i have a few drop down bookmarks and some of the sites in them have their icons, and some don’t. it drives me crazy!!!

Description : How can I add "Official Sites" Box to my Facebook page?

Last Answer : Maybe I’m not facebook savvy, but do you an example or better way of explaining?

Description : I'm trying to get on my Gmail account, and it won't load the sign-in page. Any help?

Last Answer : Maybe there is a server problem somewhere. I would quit the browser and then try again in a few minutes.

Description : What is the best width for a web page?

Last Answer : Whatever the user sets the width of the web page to in his or her browser. Fixed-width web sites are an example of bad design, right up there with best viewed in Internet Explorer 4.0 badges. ... so that it stretches if the window is larger. Liquid layout are the keywords you should search for.

Description : How to you create a "squeeze page" or landing page for an affiliate site?

Last Answer : If you have your own domain, you can just create the webpage however you like (using Frontpage or similar web design program), then save it as a webpage in your domain’s FTP server. Then just open up the page, copy the URL and use that URL to link it up from the main pages of your site.

Description : How do you save a page so you can view it without an internet connection?

Last Answer : answer:Found this walkthrough java: view source, search for applet code (or .class ) and look for a .class file near it. save the source in your preferred directory. load the .class file from your ... it. load it from your browser address bar and save it. it will play in any web browser offline.

Description : From uTorrent, how can I find the original page on the web in order to request more seeders?

Last Answer : answer:Your best bet is to type in the exact title you see in the main window into whichever torrent site you used in the first place. You can also highlight the file and click on general (first tab on bottom left) to see if it has any useful info in the tracker.

Description : What is the main page of a website called ?

Last Answer : The main page of a website is called the home page.

Description : mail.google.com, gmail.com, google.com/gmail If you enter these three addresses , why does the same page appear ?

Last Answer : Abul Kalam Azad - Abul , Kalam , Azad are 3 names of the same person. Much like this. Here the red domain from the mail domain server Google to the other 2 URLs / domains with the main domain . There is only one of these three - googlemail.com .