Alignment

I am having hard time aligning this on the same line. Please, can anyone help me?
No description
14 Replies
pb-travelog
pb-travelog•3w ago
Can you please share a codepen? There's not much to go on to help here.
theseeker
theseeker•3w ago
alright I think the problem has to do with tailwind or something
theseeker
theseeker•3w ago
this is the code in tailwind css
No description
pb-travelog
pb-travelog•3w ago
It is unlikely that this is a tailwind css issue. The codepen doesn't have any fonts selected which mean that the browser default is used also the tailwind template has not been used. But it looks like it is a font issue rather than a tailwind issue. Special characters are treated differently based on how the font designer created them. They can have what look like different baselines to other characters. You might have to isolate the '@' character to adjust its alignment seperately.
theseeker
theseeker•3w ago
oKay thanks a lot for the feedbacj
theseeker
theseeker•3w ago
You are right mate
No description
theseeker
theseeker•3w ago
I removed the font setting and this is what i got so how can I resolve this behavior and what do you mean by isolating the '@' character
pb-travelog
pb-travelog•3w ago
You could have the '@' character in a nested span allowing you to control it line positioning independently of the other text but this becomes harder to manage over time.
theseeker
theseeker•3w ago
I figured it out. Thanks so much I used align middle and that works.
pb-travelog
pb-travelog•3w ago
🙂 Please mark this thread as solved.
theseeker
theseeker•3w ago
how does that change become harder to manage
pb-travelog
pb-travelog•3w ago
You'll need specific html/css for each time you want to use a special character. Doing that once in the html is easy but each time you'd have have to repeat this pattern. Now imagine if you have more devs on the project or more pages where you need this pattern. Over time you incur a technical debt because of this decision. If you change fonts you'll have to find all places where you use this pattern to see if it was impacted by the font change.
theseeker
theseeker•3w ago
Insightful! Thanks a lot mate. Your guidance has really been helpful
Want results from more Discord servers?
Add your server