-1

How do I write border: 1px solid transparent; in tailwind css? I couldn't find a way in the docs of tailwind.

falkon
  • 29
  • 8

2 Answers2

0

According to Tailwind's border width documentation, a 1px border should be specified with just border, not border-1 like most other utilities.

In full, border-solid border-1 border-transparent

bordeaux
  • 333
  • 3
  • 15
-1

Try this,

<div class="border-solid border-1 border-transparent"></div>
pasindu
  • 529
  • 1
  • 4
  • 16
  • Thanks it worked! Also another issue i was facing was % like `width: 10%;` how could I do that in tailwind? – falkon Jul 18 '22 at 16:32
  • If this works please mark this as the answer. I think tailwind divide the section into 12 parts so idk if there is a way to get exactly 10%. you can get closer using `w-1/12` check more on docs. https://tailwindcss.com/docs/width – pasindu Jul 18 '22 at 16:38
  • 1
    Thanks worked! i also marked it as ur ans! – falkon Jul 18 '22 at 16:44