How To Apply Font Family In Html Tag Of Select Option May 17, 2024 Post a Comment I am applying Font family in tag but it is not working any option guys My code : Solution 1: You have a syntax error in your inline style, the correct syntax is: option { font-family: 'sans-serif' } Copyor with inline styles:<optionstyle="font-family: sans-serif">Font-familly Name</option>Copy'sans-serif' should be replace for the font you want.Solution 2: This is how my code runInsert fonts in head tag /* BAHAMAS */@font-face {font-family: 'BAHAMAS'; src: url('../fonts/BAHAMAS0.eot');} @font-face {font-family: 'BAHAMAS'; src: url(//:) format('no404'), url('../fonts/BAHAMAS0.ttf') format('truetype'); font-weight: normal; font-style: normal;} Copycall fonts<optionstyle="font-family:BAHAMAS;">My Font</option>CopySolution 3: #select-group{ font-family: 'samim'!important;} Copyits cant work in firefox ------But it will work in Chrome!:)Baca JugaHow To Align Pseudo Element :before :after And Span ElementHow To Check If An Html5 Validation Was Triggered Using Selenium?Jquery Datepicker Getting Displayed At The Bottom Of The Page (keith-wood Datepicker)Solution 4: So easyJust see this demo #select1 { font-family: 'sans-serif'; } #select2 { font-family: tahoma; } #select3 { font-family: monospace; }Copy<selectid="select1"><option>OPTION 1</option><option>OPTION 2</option><option>OPTION 3</option></select><br/><selectid="select2"><option>OPTION 1</option><option>OPTION 2</option><option>OPTION 3</option></select><br/><selectid="select3"><option>OPTION 1</option><option>OPTION 2</option><option>OPTION 3</option></select>Copy Share You may like these postsHow To Make Element Sizes To Fill Cell Sizes And Increase Font In Free Jqgrid Inline And Form EditingOpenlayers3: Abort The Draw InteractionHow To Change Part Of An Iframe’s Url To A Random String?Display The Number Of Times A Location Appeared In The Respective Table After Corresponding Option From Dropdown List Was Chosen Post a Comment for "How To Apply Font Family In Html Tag Of Select Option"
Post a Comment for "How To Apply Font Family In Html Tag Of Select Option"