Forums

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

Home Forums CSS Anchor div at bottom of another div (sorry, it's wordpress)

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #261522
    Bill
    Participant

    complete noob here but you guys seem to be the best at explaining things in a way everyone can understand…

    Here is what I am trying to do; have a full width section with a photo as a background. There are 3 sections (divs) within that section. I need the last one to anchor at the bottom of the parent. Here is the problem; to view the background image in its entirety, I needed to add padding to the top/bottom of the parent section – as soon as I do that it moves the last div up off the bottom by that amount. (see: pahouselink.com / luxury-home-specialists)

    again, sorry I know it’s wordpress and my terminology is not the best but I know you guys can lend some insight on a solution.

    #261541
    Beverleyh
    Participant

    I needed to add padding to the top/bottom of the parent section – as soon as I do that it moves the last div up off the bottom by that amount

    It depends what you’re doing (I haven’t visited the link), but you can position with a negative offset – try something like margin-bottom: -25px; to pull the last div back flush with the bottom.

    Learn more about layout here http://learnlayout.com so that you can finally remove that “noob/newb” label ;)

    #261583
    Bill
    Participant

    Beverleyh – thanks for responding. Read over your link, added this class, and it seems to be working (although I can’t explain why :O)), responsively, on all browsers

    .custom-anchortobottom{
    margin: 0;
    min-height: 40px;
    bottom: 0;
    position: absolute;
    }

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