- This topic is empty.
-
AuthorPosts
-
July 4, 2014 at 3:44 am #174563
KKHAN
ParticipantHi,
I am trying to set the height of the content to the height of the page, whilst using a sticky footer.
.content-main { border-right:1px solid #cbcbcb; height: 100%; min-height: 100%; }
However, this is not taking effect (border does not show full height of page). Is there a hack or work around for this?
Condensed code. CodePen
July 4, 2014 at 4:26 am #174565Paulie_D
MemberDoes the
.content-main
div contain nothing but floated or positioned elements?If so, it’s collapsing to zero height which is why the border isn’t showing up.
As a quick clearix (like
overflow:hidden
) and the border shows up and expands to the bottom of page if the content is long enough…click you ‘setting’li
to see.July 4, 2014 at 6:01 am #174584KKHAN
ParticipantYes
overflow:hidden does bring the border. But can you see how the border is not 100% height of the page. Which is what i am after. Which you have mentioned depends on the height of the content.
However, i do not want it to depend on the height of the content, the min-height should always be 100%. So the border needs to go all the way down the page.
I’m just at a complete loss. Is this just a hard technique to implement? Am i doing it an awkward way? Is there a better way to implement the EXACT same layout/functionality?
July 4, 2014 at 7:39 am #174590July 4, 2014 at 10:07 am #174607KKHAN
ParticipantCan you see whats wrong with what uve changed and why it might not suit what i want?
- The Footer is now in a contained width and not full width of the page.
- The Heights are still not height of the page. Just have a look at the borders to work that out.
Sorry, this is not what i am after :(
July 4, 2014 at 1:32 pm #174635July 4, 2014 at 1:46 pm #174637KKHAN
ParticipantNo, there is not much leeway i am willing to give. If exactly what i want can’t be done with my code i am willing to change, instead of trying to hack it. You’re second example still has border problems. I know this can be done ive seen it on other sites.
Im surprised no one has posted a solution yet, makes me wonder if this is just hard to implement?
July 4, 2014 at 2:08 pm #174640jurotek
ParticipantWhat problem with borders you referring to. They’re 100% of page height as you wanted and footer is now 100% width.
July 4, 2014 at 2:32 pm #174643Paulie_D
MemberIm surprised no one has posted a solution yet, makes me wonder if this is just hard to implement?
I’m not sensing a lot of gratitude for the work people are putting in to solve your design problem.
If you want quick solutions…hire someone.
July 5, 2014 at 2:15 am #174668 -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.