Good afternoon people!. I have searched for half an hour and I have not found anything that works for me or gives me positive results. I have a pivot table that changes the number of rows to display based on what one selects from the DropDownList. The problem is that for those cases in which the table has few rows, the footer gets out of place and, as you can see below, it is not "stuck" properly to the footer.
I have tried with the position attribute, with others of which I had never heard but I can't get the footer to always stick to the footer. At the moment this is what I have in my css;
footer
{
margin-top:50px;
width:100%;
height:200px;
background-color:red;
}
From already thank you very much!
You could "push" the footer down in such a way that when the table is very large it doesn't cover it however when it is very small the footer stays at the bottom.
I leave you an example
Note: Run the snippet full screen so you can see the result better.
If the table is very large, the footer is adjusted to the height of the page instead of covering it.
You should set the position to fixed and the left and bottom to 0 so that it is fixed at the bottom left of the page:
You can use Bootstrap, including the library in the head and adding the class
.navbar-fixed-bottom
to the footer as follows:Finally, in the style of the body you put:
and it would be very nice.
PS: The bootstrap library is not only useful for this, it has many advantages in terms of aesthetics.
I've run into this same problem and haven't been able to fix it other than using Flexbox.
The topic is relatively simple (once you've wrestled with half of the answers already given). Let's imagine that we have a structure composed of HEADER, BODY and FOOT.
To this we are going to assign the property "display: flex" of Flexbox in this way:
Let's assume, for example, that HEADER and FOOTER have an assigned size of:
Now to BODY we can add a unique feature that will do the magic:
In this way we are giving the remaining height to the content in BODY, and it will push PIE towards the bottom of the screen, whatever height it is.
Good.. A practical way to include it would be..
Having the footer.php file
With the style.css properties
And invoking it from any page with..
I hope it has served, greetings..
I don't know if it works, but I found a good solution, you have to use the relative position...
If you want here is a link to github
I solved it in the following way:
I made a new container that would be what would go inside, in your case it would be the table, once you have that I gave the style to
nav
and tofooter
, that it shouldnav
occupy width and3.5 em
height100vw
and that it be glued above putting0
demargin
, andfooter
I putposition relative bottom 0
, but what this does is that it positions it according to the flow of the page, so if nothing is written in the content the footer is uploaded, that is what happens in your case, then you would have to do the following: put a class on it to the content that is going to be here.content
and give it amin-height
from77.6vh
or whatever fits your pageand there it is, and if you put more elements inside the content, the footer will go down and if there is no content, the box would remain in 77.6vh because it has the min-hight property.
With position fixed it will always be visible at the bottom if that is what you want:
A very simple way to do that is by placing a size
footer
in percentage, for example like this: