- This topic is empty.
-
AuthorPosts
-
July 10, 2014 at 2:02 am #175123roelofParticipant
Hello,
Last problem before I can use the layout in production.
I have now this : http://test2.tamarawobben.nl
But as you can see if there is not so many content, the border is not at the bottom of the screen.
Is there a css-trick to take care of this problem ?
Roelof
July 10, 2014 at 2:26 am #175124Paulie_DMemberYes, try googling Sticky footer or just see here…
July 10, 2014 at 2:44 am #175128roelofParticipantI have looked at that one but my footer does not have a height.
It appears that the height is made by padding 0 3em 0 4emRoelof
July 10, 2014 at 2:47 am #175130Paulie_DMemberOther than flexbox you will have trouble then. You could use absolute positioning but that’s a little inflexible too.
What’s wrong with giving the footer a height?
July 10, 2014 at 3:30 am #175131roelofParticipanthello,
I did try your suggestion but now I see a white area between the main section and the footer section.
See again : http://test2.tamarawobben.nl
July 10, 2014 at 3:52 am #175134Paulie_DMemberMy guess is that you haven’t followed the instructions properly.
Have you set the HTML & body heights as required..because it doesn’t look like it?
Have you added a wrapper etc?
July 10, 2014 at 3:55 am #175135roelofParticipantHello,
As far as I know I did follow the instructions on this page: https://css-tricks.com/snippets/css/sticky-footer/
And there is no mention of a wrapper.
Roelof
July 10, 2014 at 3:58 am #175136Paulie_DMemberIt’s implicit in the HTML structure.
<div> /* see here !! */ Content! </div> <footer class="site-footer"> I'm the Sticky Footer. </footer>
July 10, 2014 at 4:07 am #175137roelofParticipantyep,
page-wrap is called main here. That is already a wrapper
and site-footer is called footer.So I added or changed the css according to that page but to my own classes.
Roelof
July 10, 2014 at 4:24 am #175138Paulie_DMemberThe page-wrap suggested has to come immediately after
body
and wrap ALL elements excluding the footer.Yours does not.
Your ‘main’ div is just one of several inside the
<body>
.July 10, 2014 at 9:03 am #175156paulobParticipantHi,
For IE8+ you can do this very easily without needing to have any set heights on the footer which is ideal in a responsive design and needs no pushers, margins or space saving techniques.
http://codepen.io/paulobrien/full/FKAxH/
Remember though that you cannot nest the main wrapper or place it below other content because 100% is from top to the bottom and if you nest inside another element you will get height:auto and if you place it below another element in the flow you get 100% from where it starts leading to the footer going below the fold.
You would just need to put your layout inside the above structure. Here is an example with a left fixed column:
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.