I need the text to have a black border.
I tried this,
<div className="font-bold text-2xl text-white outline-4">
Hello
</div>
But it doesn't seem put a border to the text.
CodePudding user response:
you can try it
<div className="font-bold text-2xl text-white border-2 border-black">
Hello
</div>
CodePudding user response:
Two ways to do that for you case.
- you change the div to an inline element or
- you wrap the text with a inline element. e.g span
<div className="inline font-bold text-2xl text-white outline-4 border-2 border-black">
Hello
</div>
<div className="font-bold text-2xl text-white ">
<span className="outline-4 border-2 border-black">Hello</span>
</div>