Ask coding questions

← Back to all posts
Anyone know how I can make the text in my footer div be side by side (but still be in the center)?
QuickV (130)

In my Calculator repl, inside of the footer with the id "footer", the text seems to be on top of each other... Like this:


This page was viewed
_
times


Except my goal is for the text to be like this:

This page was viewed _ times


Anyone know a way of how I can make the text be "side by side", but also be centered in the middle of the page?

Answered by ruiwenge2 (1209) [earned 5 cycles]
View Answer
Comments
hotnewtop
ruiwenge2 (1209)

Replace that with

<p>This page was viewed <span id="views">0</span> times</p>

And in the css you can do:

#views {
  font-size:30px;
}
p {
  text-align:center;
}
QuickV (130)

I didn't think span would work inside of a p tag so I didn't try that :D... Anyways, lemme test that out. @ruiwenge2

QuickV (130)

It worked! Thanks :D. @ruiwenge2