Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Erick Martinez
Erick Martinez
2,894 Points

How do I move the paragraph element and an <a> element to the bottom of the footer?

Here is my webpage, https://erickthemeeknerd.github.io/

If you look at the bottom of the page in the footer you'll notice the <p> & an <a> element kind of in the center of the footer. I want to put in at the bottom and have them sit side by side preferably with a line dividing them.

1 Answer

I would suggest wrapping your p tag and anchor tag in a div. Then you can use flex on your footer:

.main-footer{ display: flex; flex-direction: column; height: 200px; // using a height instead of padding }

this css would be on the new div wrapper of the a and p div{ margin-top: auto; }

p{ display:inline; border-right: 1px solid red; //adds a line }

or add a line after your p tag you can use a pseudo

p:after{ content: '|'; }