user2661518
user2661518

Reputation: 2745

html footer add it to end of line

I have footer as below and it shows properly with company name added to left of footer line.

<footer>
    <p>Company, Inc.</p>
</footer>

I want to add contact link at end of footer line which will be at end of line.

I tried this

<footer>
        <p>Company, Inc.</p>
        <p>phone number:123456789</p>
</footer>

But it gets stacked one below other

Upvotes: 1

Views: 208

Answers (2)

Vlad Pana
Vlad Pana

Reputation: 167

<footer>
    <p style="display:inline;">Company, Inc.</p>
    <p style="display:inline;">phone number:123456789</p>
</footer>

Upvotes: 0

Michael Coker
Michael Coker

Reputation: 53674

Use footer { display: flex; justify-content: space-between; } to put them on the same line, separated by all of the free space in the footer.

footer { 
  display: flex;
  justify-content: space-between;
}
<footer>
        <p>Company, Inc.</p>
        <p>phone number:123456789</p>
</footer>

Upvotes: 5

Related Questions