0
HTML CSS center a paragraph
<div> <p id="clock"></p> <p id="time"></p> </div> I have two paragraphs. The first one (analog clock) has a fixed position on my page. I'd like to fix the second one (containing digital clock representation of the clock that is above) below the analog clock. The length of the text is changing, so I would like to center it between side margins so that its horizontal center matches the above clock's center. How should I do that? Thanks in advance.
3 Antworten
+ 1
Any way we can see the full code (or the relevant part) in a link to your Code Playground project? I noticed that you are showing empty elements.
0
Perhaps this is what you look for
using relative position in parent with absolute position in child element.
https://code.sololearn.com/WHi6fGqcSGlJ/?ref=app
0
could you post your code here?