I want to position the footer at the bottom of the page which having a fixed header also...   Not with position: fixed - I don't want it to remain on the screen, it should just be at the end of the page and behave normally when scrolling. Not at the bottom of the visible screen - At the bottom of the page, i.e; after all other content.     Here's a diagram to explain better:      Here's the code:   I have prepared a demo:  Or see below   &lt;div id="header"&gt;Header&lt;/div&gt; &lt;div id="content"&gt;     &lt;p&gt;Some content...&lt;/p&gt;     &lt;/div&gt; &lt;div id="footer"&gt;Footer&lt;/div&gt;   body{     /* Just to enable scrolling in JSFiddle */     height: 1000px; }  #header{     width: 100%;     height: 100px;     position: fixed;     top: 0px;     z-index: 1; }  #content{     width: 100%;     position: absolute;     top: 100px; /*Height of header*/     z-index: 0; }  #footer{     width: 100%;     height: 100px;     position: absolute;     bottom: 0px; }  /*For demo only*/ #header, #footer{     border: 3px dashed #333333;     background: #FFFFFF; }  #content{     background: #CCCCCC;     height: 200px; }
3362
I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.
36425
When a code snippet is long enough to prompt scrolling (especially horizontal scrolling), it would be helpful to offer a link to view the code snippet in a new window.  I'm thinking that the link should be positioned below the snippet, since most people will decide to use it after scanning the part of the snippet that is visible without scrolling.
56333
I would like to remove page numbering on a specific page. However, the header and footer should remain intact. If I try:  \thispagestyle{empty}   The header and footer disappear. What is the recommended way of removing just the page number?
4250
I am working on a long document in LaTeX with documentclass book. I need the page number to always be in the upper right corner of each page, even if that page is the first page of a chapter (right now on 1st pages of chapters, the page number is bottom-centered, on all other pages it's top-right).  I control the position of the page number with fancyhdr:  \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{} \rhead{\thepage} \lfoot{} \cfoot{} \rfoot{} \renewcommand{\headrulewidth}{0pt}   Also, I don't know if the problem is related but my chapters do not start from the top of the page. There is a white area, then comes chapter X, then a newline with the chapter line. What I also want is the chapter to start from the top of the page.  The main question here is how I can get the page number to always appear in the upper right corner, I mention the thing with the chapter title position only in case that might be related.
30717
When I can scroll down far enough to have the hot network questions overlap the footer (because my question is short) there is no background under the text:    Could they either be given a white background: (just disable the transparency option)    Or stop at the footer:      This also happens with the help text on some sites, as per this bug report:     Ubuntu 14.04.1 (Latest LTS Version), . Same problem with  and .  Windows 10 Pro,  and .  (Images linked to screenshot of browser)  My question is different from  because my issue is the lack of background on the footer.   I think there was a site redesign?
76629
How can I modify title page so that it looks like it is in  video. Please seek to 16 seconds and watch title page. I do not have permission to post images. I liked this theme and I want to make a beamer theme that looks similar. I tried with beamercolorbox but I failed to position the box to the bottom.      Edit: Here is my minimum working example  \documentclass[xcolor=dvipsnames]{beamer} \defbeamertemplate*{title page}{customized}[1][] { \usebeamerfont{subtitle} \usebeamercolor[fg]{subtitle}  {\flushright \setbeamercolor{author}{bg=white,fg=Red} \usebeamerfont{author} \insertauthor\par \usebeamerfont{institute}\insertinstitute\par }  \vspace{0.2in}  \setbeamercolor{postit}{fg=white,bg=YellowOrange}  \begin{beamercolorbox}[sep=1em,wd=1.062\textwidth,ht=3cm,dp=3cm,right]{postit} \usebeamerfont{title} {\huge \inserttitle}\par \usebeamerfont{subtitle} {\insertsubtitle} \end{beamercolorbox} } \usecolortheme[named=YellowOrange]{structure} \useoutertheme{infolines} \setbeamertemplate{navigation symbols}{}  \institute{Harvard College Professor and\\ Johnstone Family Professor in Psychology, Harvard University}  \title{SAY WHAT?} \subtitle{Linguistics as a Window to\\ Understanding the Brain} \author{Steven Pinker}  \begin{document} { \setbeamertemplate{footline}{} \begin{frame} \titlepage \end{frame} } \end{document}
20717
What is the best way to vertically center the content of a div when the height of the content is variable.  In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a solution with no, or very little use of CSS hacks and/or non-semantic markup.
99473
As the title says. I use, among other things, the following in my lstset:  framerule=1pt, frame=tblr   Some places a page break happens in the middle of my \lstlisting. Fine. But sometimes the whole code of the listing appears on one page, but the bottom frame appears on the top of the next page!    I know that I can float a particular listing, but I have a long document with many listings, and I don't want to float all of them; Most of them also need to be exactly where they are declared. That they are broken over a page doesn't bother me that much.  Is there something that can stop this from happening, without me needing to adjust each individual listing?   had the same problem, but fixed it by removing spaces in front of keywords in a custom language definition. I too have a custom language definition, but his solution doesn't help me. I managed to recreate the situation without a custom language.  Edit and MWE  I managed to reproduce it in a minimal working example. 's a pastebin, if that's helpfull.  \documentclass[UKenglish,a4paper,11pt]{report} \usepackage{babel}  %% Adjustments \addtolength{\topmargin}{-1\baselineskip} \addtolength{\textheight}{4\baselineskip} \pretolerance = 2000 \tolerance = 5000   \hbadness = \tolerance  %% Smaller font \usepackage{mathptmx}  %% LISTINGS \usepackage[final]{listings} \lstset{     xleftmargin=1.5em,     framexleftmargin=1em,     framextopmargin=0.5ex, %%  THE FRAME:     framerule=1pt,     frame=tblr }  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \usepackage{lipsum}     % for demo \begin{document} \subsubsection{Lorem}   % some fiddling to get the "wrong spacing just right": \lipsum[1-3] \subsubsection{Ipsum}  \lipsum[1] and then some text  \begin{lstlisting} Here is a listing with three lines of code; The bottom border is placed on the next page! \end{lstlisting}  Can you believe it..?! \end{document}   This MWE is rather long. My document inputs most of the listings stuff from files written by others, so I'm not sure what all of it does. If anyone sees some lines that they are sure is irrelevant, feel free to take it out of the MWE.  "Fun fact"  An equally silly situation occurs if you remove \usepackage{mathptmx}: The whole code listing will then appear on the new page, except for the top frame which is left on the bottom of the first page!
108954
I would like to get the absolute position of an element in relation to the window/root element when it is double clicked. The element's relative position within it's parent is all I can seem to get to, and what I'm trying to get to is the point relative to the window.  I've seen solutions of how to get a the point of an element on the screen, but not in the window.
5189
Hopefully, this will be an easy answer for someone with Javascript time behind them...  I have a log file that is being watched by a script that feeds new lines in the log out to any connected browsers.  A couple people have commented that what they want to see is more of a 'tail -f' behavior - the latest lines will always be at the bottom of the browser page until the viewer scrolls back up to see something.  Scrolling back to the bottom should return you to the auto-scrolling behavior.  My google strikeout on this one is - hopefully - just a matter of not knowing anything at all about javascript and therefore, not knowing what keywords to search for.  I don't need a complete solution - just a 'close enough' that lets me jump in and get my hands dirty.  EDIT:  I've been attempting the scrollTop/scrollHeight idea, but am clearly missing something.  I've done next to nothing with Javascript, so again I'm probably asking very low-level questions:  &lt;html&gt;&lt;body&gt; &lt;script type="text/javascript"&gt; for (i=0; i&lt;100; i++) {     document.write("" + i + "&lt;br /&gt;");     document.scrollTop = document.scrollHeight; } &lt;/script&gt; &lt;/body&gt;&lt;/html&gt;   This was one of many permutations.  Obviously, I can't output the log line-by-line in javascript, but I'm just trying to see the correct behavior.  What's the missing link I need here?  EDIT AGAIN: This has turned into a far more interesting problem that I first expected.  The code suggestion using window.scroll does do the trick.  I started playing with restricting the scroll to only take place when the browser was at the bottom of the document body.  This is easy enough to do in theory, but in practice it hits a snag:  Every time you get new text from the server, the size of the body increases and your current scroll position is no longer at the bottom of the document.  You can no longer tell the difference (using scrollHeight, clientHeight and scrollTop) whether the user has scrolled up or if the text has just shot beyond their view.  I think that if this is going to work, I'm going to have to commit myself to having a JS event that fires when the user scrolls and turns off scrolling if they are above the bottom of the window, but turns it back on if they have scrolled down to the point where they are effectively at the bottom of the view.  I'm looking at the onScroll event and, given that the math on the variables I mentioned works out pretty well, I think I am on the right path here.  Thanks for your input, everyone!
119721
In a two column document in LaTeX, is there any way to put a table* (a table spanning both columns) at the bottom of the page?  The obvious doesn't work:  \begin{table*}[b]   % b!, hb, hb!, etc. doesn't work either    %... a wide table \end{table*}
102812
&lt;div class="subheader"&gt;         &lt;h1&gt;         &lt;/h1&gt; &lt;/div&gt;   .subheader has style border-bottom: 1px solid #e4e6e8;.  The bottom border should be below the whole title (I guess, the point is to separate the whole title). But the height of this div is hardcoded height: 40px;.  Shouldn't it be like this? (the screenshot with height: 80px;).
2807
Given a template where the HTML cannot be modified because of other requirements, how is it possible to display (rearrange) a div above another div when they are not in that order in the HTML? Both divs contain data that varies in height and width.  &lt;div id="wrapper"&gt;     &lt;div id="firstDiv"&gt;         Content to be below in this situation     &lt;/div&gt;     &lt;div id="secondDiv"&gt;         Content to be above in this situation     &lt;/div&gt; &lt;/div&gt; Other elements   Hopefully it is obvious that the desired result is:  Content to be above in this situation Content to be below in this situation Other elements   When the dimensions are fixed it easy to position them where needed, but I need some ideas for when the content is variable. For the sake of this scenario, please just consider the width to be 100% on both.  I am specifically looking for a CSS-only solution (and it will probably have to be met with other solutions if that doesn't pan out).   There are other elements following this. A good suggestion was mentioned given the limited scenario I demonstrated&mdash;given that it might be the best answer, but I am looking to also make sure elements following this aren't impacted.
17457
I have a table that is longer than one page. I have found the option to make the header of the table to be added to the second portion of the table after the page break. Is there a way to do the same thing with a footer on the table? I want to add a footer so that if my table was 1000 entries long (12 pages), that the first and last row of each page would be consistent; a header and footer for the table. If I edit the rest of the document (above the table) the table will shift up/down and I want to header and footer of the table to remain at the page breaks. Any ideas?     PAGE BREAK   HEADER OF TABLE TBL TBL TBL TBL TBL TBL TBL TBL TBL TBL TBL TBL FOOTER OF TABLE      PAGE BREAK   HEADER OF TABLE TBL TBL TBL TBL TBL TBL FOOTER OF TABLE  TEXT TEXT TEXT TEXT TEXT TEXT      PAGE BREAK
111986
How could I position the epigraph in the end of the page, instead of at the beginning? I'm using this preamble:  \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3cm,right=2cm,top=3cm,bottom=3cm]{geometry} \usepackage{color} \usepackage[dvipsnames]{xcolor} \definecolor{darkgray}{gray}{0.3} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \usepackage[pdftex, colorlinks=true, linkcolor=darkgray, citecolor=blue, urlcolor=blue]{hyperref}   and this commands on the page intended to the epigraph:  \thispagestyle{empty} \epigraph{O problema dessas citações na internet é a dificuldade para saber se elas são realmente autênticas.}{Friedrich Nietzsche}   I already tried to use \vspace{} and \vfill, and they dont work.
25022
I am using my school's latex . Unfortunately, since this package was last updated, we are now required to add the word 'Page' above the topmost page number on each page of the Table of Contents. This cls file includes the following bit of code, which puts 'Page' at the top of the first page, but not any subsequent pages (see attached)  \newcommand\chapteruaf{ \if@arabic\relax\else\if@chapterone\setcounter{page}{1}\else\relax\fi\fi \@chapteronefalse                     \if@openright\cleardoublepage\else\clearpage\fi                     \thispagestyle{myheadings}%                                                                                                    \global\@topnum\z@                     \@afterindentfalse                     \secdef\@chapter\@schapteruaf} \def\@schapteruaf#1{\if@twocolumn                    \@topnewpage[\@makeschapterheaduaf{#1}]%                                                                                     \else                    \@makeschapterheaduaf{#1}%                                                                                                     \@afterheading                  \fi} \def\@makeschapterheaduaf#1{%                                                                                                    {\parindent \z@ \centering     \reset@font     \normalsize \bfseries  #1\par                                                                                                  \vspace{-18.3pt}\hspace{143mm} Page                                                                                            \nobreak   }}   First page of the TOC:   second page of the TOC:   Any thoughts here? I have played with this a bit, and can't get it to work. Thanks.
98736
I would like like to get the scroll position of a tbody in a lightning component, what's the supported way to do this?   cmp.find('myComponent').getElement().scrollTop is undefined. If I do this in pure javascript it works fine, but there's something funny going on in lightning. I thought reading the dom was acceptable. Thanks for any insights into this.     &lt;table&gt;  &lt;tbody style="height:100px; display:block; overflow:auto;" onscroll="console.log(this.scrollTop);"&gt;   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/t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&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;              &lt;/tbody&gt;