Search
 
SCRIPT & CODE EXAMPLE
 

CSS

Tailwind CSS select

<label for="countries" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400">Select an option</label>
<select id="countries" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
  <option selected>Choose a country</option>
  <option value="US">United States</option>
  <option value="CA">Canada</option>
  <option value="FR">France</option>
  <option value="DE">Germany</option>
</select>
Comment

custom select tailwind css

<div class="inline-block relative w-64">
  <select class="block appearance-none w-full bg-white border border-gray-400 hover:border-gray-500 px-4 py-2 pr-8 rounded shadow leading-tight focus:outline-none focus:shadow-outline">
    <option>Really long option that will likely overlap the chevron</option>
    <option>Option 2</option>
    <option>Option 3</option>
  </select>
  <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
    <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>
  </div>
</div>
Comment

PREVIOUS NEXT
Code Example
Css :: button css 
Css :: css window height 
Css :: css position fixed center 
Css :: how to view downloading speed 
Css :: paragraph next to image html 
Css :: repeating-linear-gradient generator 
Css :: outline radius css 
Css :: css anchor fill parent 
Css :: plasma state of matter 
Css :: crop image instead of resize css 
Css :: flexbox align last item right 
Css :: center an image 
Css :: glassmorphism in css 
Css :: background image with color overlay gradient css 
Css :: import google fonts into react 
Css :: vertical padding css 
Css :: input uppercase with css 
Css :: make text bold without font-weight 
Css :: css max width media 
Css :: change default arrow icon for accordion in bootstrap 
Css :: css table properties 
Css :: css keyframes 
Css :: css combinators 
Css :: over to remove padding css 
Css :: how to give opacity to border 
Css :: line sharpness css 
Css :: make form scrollable 
Css :: how to center an overlay button using css transform and translate 
Css :: Trimming One Line with CSS 
Css :: html disabled hover style 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =