Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Need a solution to fix a problem of height.

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #46253
    jignesh
    Participant

    Hello all,

    I hope you all are fine as this is my first discussion here and i would be happy if i get a solution to fix my problem.

    I am working for one of my freelancing project and the thing is i am getting a problem with a middle division. as its affecting it with footer so how can i set my middle (wrapper) dynamically…

    can any one please help me with this. What CSS can i use instead of height.

    #142018
    jurotek
    Participant

    Looks like you need sticky footer solution. Google is your friend for that or search on here.

    #142026
    jignesh
    Participant

    `

    this div is with 100% width

    wrapper which stays in the middle

    footer is in 100% width

    `

    this is my code so i wont be able to use fix height as all site pages are dynamic height so when can i use instead of height in middle-wrap class to fit footer just below the wrapper division.

    #142020
    jignesh
    Participant

    **sorry ignore my previous comment

    now what CSS should i use to avoid height and not affect on footer division.
    **

    #142021
    Paulie_D
    Member

    We still don’t understand what you want the footer to do.

    Should it always be at the bottom of the page regardless if the height of the content?

    #142028
    SamuelNeudeck22
    Participant

    Best I can tell if your footer is affecting your div that is not in the footer, then you need to separate the two. If you want a fixed footer on every page as Paulie_D asked then put it in its own footer div and give it a; position: fixed; and set your ‘top’ and ‘left’ properties accordingly. Then your footer will be constant and your main content can change. as far as height goes, make sure your using the box model correctly with your padding and margins then say either height: (insert px, em, or %), or max-height: (insert px, em, or %). I hope this helps. As a new poster like yourself I find it very helpful to use codepen and link to your problem page if possible so that people understand your question better.

    #142033
    Paulie_D
    Member

    Sticky footer can also work…no positioning required.

    http://codepen.io/chriscoyier/pen/uwJjr

    #142071
    jignesh
    Participant

    Thank you so much for your special comments i appreciate it.. i will try with sticky footer so if i use this does my middle portion will be dynamic? how ever my middle portion will be increased or decreased footer will also stay with it???

    #142072
    jignesh
    Participant

    **here is my code **

    This is a fixed header

    WITH 100% WIDTH

    with fixed width content

    #142083
    Paulie_D
    Member

    Please try using Codepen to demonstrate your HTML & CSS.

    I believe that we have already given you the answers you need.

    #142105
    gowda24
    Participant

    Hi,

    Check out the code below

    [fixed footer…](http://codepen.io/gowda24/pen/ohCFn “fixed footer”)

    When no content, the footer sticks to bottom.
    When content added dynamically, and then height grows, as height given as auto, but
    the footer remains at t bottom.

    #142119
    Paulie_D
    Member

    This is a sticky footer and we’ve already given you an example.

    #142251
    jignesh
    Participant

    hello guys thank you so much for your help and it is solved now with sticky footer….

    **Thank you so much :)**

Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘CSS’ is closed to new topics and replies.