Comments (10)
Hi again metropt.
That type of footer is a sticky issue (pun intended), as it requires knowledge of the footer height and some css / html trickery to work properly. So we opted to not include it as an out of the box solution.
What we are doing when using ink to build site and need a sticky footer is to implement Ryan Faits' Sticky footer.
from ink.
thanks for the tip :)
from ink.
Do you have any example of a page where you use it?
Thanks
from ink.
We have some ongoing projects that use it but they're not public, so i've cooked cooked up a simple example:
Basically you'll need a element that wraps the whole page, except the footer itself.
A "pusher" element that sits immediately before the wrapper close tag with the same height as the footer.
And some css to make the whole thing work.
This is the basic structure you'll need:
https://gist.github.com/pedrocorreia/5047398#file-stickyfooter-html
Check out the example and let me know if i can help with anything.
from ink.
Hi,
Really thank you for your example but it didn't work properly in a simple example I've done
http://josescxavier.com/testes/footer/footerteste.php
from ink.
I think you forgot to include the <body>
tag in your page.
I just did a wget on that url and the resulting document does not contain a body tag. That weird space is created when the browser tries to fix mistakes or omissions in the document.
Wget output from your page url: https://gist.github.com/pedrocorreia/5056205#file-no-body-html
from ink.
I added the body tag but the result is the same :s Thanks for your help
from ink.
Ok, let me have another look then.
from ink.
Hello @metropt,
here's my stab at this.
You have several problems in your demo that, while not directly connected to the issue you're seeing, will sting you later, one way or the other.
Here they are in form of a short list. ;)
- Absent doctype. This will make browsers switch into quirks mode. You don't want that, it will induce weird behaviors on a lot of issues in the rendering of your pages. Add <!doctype html> to the first line, like in @pedrocorreia's example.
- Absent
<html>
. You want it there, trust me. ;) - You have a
<div class="wrap">
before the<head>
. This causes the browsers to start rendering a fake<body>
tag and dumping all the<head>
contents into it. Again, weird stuff will start happening, like FOUC (google it to know more ;) ). Move it to the first thing inside the<body>
tag.
Now all these issues are for your sake, but won't fix the issue you're complaining about.
This is directly attributed to the (collapsing of the) margin-top in .ink-vspace
. What happens is that the element pushes away what's before. Since there's nothing, the <body>
will come down a notch. Add to that notch 100% height to it and you get 100% + 32px (the margin-top).
You can fix this but either:
- remove
.ink-vspace
- override the styling and make that
.ink-vspace
specifically have amargin-top: 0;
and apadding-top: 32px;
- Make the
margin-bottom: -100px;
on the .wrap bemargin-top: -132px;
(adding the 32px).
Let us know if any of these fixed it for you and which one you went with.
This will help you get your demo working, but this raises an issue for us. I think we should revise why .ink-vspace is using margins instead of paddings. Paddings don't collapse, margins do. And we can control how paddings affect (real) width with box-sizing
.
This won't, however, be fixed on the current version of the library, since it would break existing layouts horribly. But will influence future releases, for sure.
Thanks a lot for your feedback and questions. It might have given us an opportunity to iron out a small but important bug.
from ink.
Adding overflow: auto;
to the .wrap
class also fixes it.
div.wrap {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -100px; /* the bottom margin is the negative value of the footer's height */
overflow: auto;
}
from ink.
Related Issues (20)
- delete
- delete
- all-100 doesn't push out to full width HOT 2
- Node 6.4.0 Breaks Ink HOT 2
- Issues with Next button of date picker HOT 1
- IE 8 Errors out on missing Ink.Util.Validator_1 module HOT 2
- Lazy loads with Carousel HOT 1
- Modal dialog does not appear
- can't choose past years on datepicker
- date format rule problem in datepicker HOT 1
- React support HOT 1
- tooltip not showing up HOT 2
- Further development HOT 1
- What Happened? HOT 2
- ssl on your cdn not working HOT 2
- Typescript: Cannot find name 'Ink' HOT 1
- Ink.UI.SmoothScroller - preventDefault - page still refreshing HOT 1
- Hide div based on specific screen size HOT 1
- Ink Badge being cut off HOT 1
- Ink-badge is adding a .6 left margin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ink.