how do i make these both in same line?
Answered
Black carpenter ant posted this in #help-forum
Black carpenter antOP
hey, i have a small ques. im a beginner in react and it's the only react-related community i'm in
how do i make these both in same line?
<span>links</span>
<span>
<WordRotate
className="text-5xl font-extrabold dark:text-white"
words={["shorter.", "readable.", "stand out."]}
/>
</span>
how do i make these both in same line?
Answered by B33fb0n3
wrap it inside a div and give the div the css "display: flex":
<div className='flex justify-center items-center'>
<span>links</span>
<span>
<WordRotate
className="text-5xl font-extrabold dark:text-white"
words={["shorter.", "readable.", "stand out."]}
/>
</span>
</div>
5 Replies
@Black carpenter ant hey, i have a small ques. im a beginner in react and it's the only react-related community i'm in
js
<span>links</span>
<span>
<WordRotate
className="text-5xl font-extrabold dark:text-white"
words={["shorter.", "readable.", "stand out."]}
/>
</span>
how do i make these both in same line?
wrap it inside a div and give the div the css "display: flex":
<div className='flex justify-center items-center'>
<span>links</span>
<span>
<WordRotate
className="text-5xl font-extrabold dark:text-white"
words={["shorter.", "readable.", "stand out."]}
/>
</span>
</div>
Answer
@B33fb0n3 wrap it inside a div and give the div the css "display: flex":
tsx
<div className='flex justify-center items-center'>
<span>links</span>
<span>
<WordRotate
className="text-5xl font-extrabold dark:text-white"
words={["shorter.", "readable.", "stand out."]}
/>
</span>
</div>
Black carpenter antOP
<div className="flex justify-center">
links
<span>
<WordRotate
className="text-5xl font-extrabold dark:text-white"
words={["shorter.", "readable.", "stand out."]}
/>
</span>
</div>
fixed
thank you!
happy to help