+ 4

How can I make 2 different paragraphs on the same line?

Recently I have been attempting to create a loading animation, and in order to do so I wanted to have multiple paragraph IDs of this text symbol "|" to make it look cool. If I do this: <p id = "test1"> | </p> <p id = "test2"> | </p> It puts the "bars" on different lines. Is there any way that I can put them on the same line?

19th Apr 2017, 1:20 PM
iBrandon
iBrandon - avatar
8 Réponses
+ 5
<p> whenever closed should take you to new line so whether to include <span> or create a list for that GOOD LUCK
19th Apr 2017, 3:59 PM
Abdel
Abdel - avatar
+ 4
Yes, use <span id="test1">|</span> and for the other one as it is an "inline element" and won't line break.
19th Apr 2017, 4:27 PM
Mark Foxx
Mark Foxx - avatar
+ 3
Thank you guys so much for the help!
19th Apr 2017, 9:20 PM
iBrandon
iBrandon - avatar
+ 2
Sorry if my explanation is a bit confusing 😂
19th Apr 2017, 1:21 PM
iBrandon
iBrandon - avatar
+ 2
Is it possible to change css components with getElementById?
19th Apr 2017, 3:30 PM
iBrandon
iBrandon - avatar
+ 2
that right @Mark
19th Apr 2017, 4:31 PM
Abdel
Abdel - avatar
+ 1
thats because the <p> tag is supposed to do that I would recommend you to try it with something like using a table or you use CSS and do somethng like: p { float : left; } it is my first impression how to solve this, so it is possible that I am wrong
19th Apr 2017, 2:17 PM
Dominik Kleidt
+ 1
yes you can use JavaScript or CSS in CSS just usw #yourid{ } for JS I cannot tell how but it is possible
19th Apr 2017, 3:33 PM
Dominik Kleidt