Centering Footer

Discussion in 'Web Design' started by Kit_Pantelope, Mar 30, 2017.

to remove all ads.
Thread Status:
Not open for further replies.
  1. Kit_Pantelope

    Kit_Pantelope New Member

    Messages:
    16
    Hey guys,

    I need some help centering this footer. I apologize about the mess as I took it from another pen.

    In case, I need help centering the footer content. I tried nesting it inside of another div but didn't seem to work correctly. Mind taking a look?

    http://codepen.io/kit_navo/pen/vxQOME

    Thanks,
     
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,675
    set a block level element with less than 100% width of the parent element and set side margins to auto, without absolute or fixed position.
     
  3. Kit_Pantelope

    Kit_Pantelope New Member

    Messages:
    16
    You mean set a div around just inside the footer and center it with margin: 0 auto?

    Btw, just used your Karma Sutra of CSS to solve a problem, so thanks :)
     
  4. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,675
    Yep just as long as what you want to be centred is less than full width.


    No problem, glad it helped.
     
Thread Status:
Not open for further replies.

Share This Page