Solved

option tag entries appear in small font

Posted on 2016-09-22
12
23 Views
Last Modified: 2016-10-02
I'm having a problem with the font size used in the <option> entries for <select> tags. No matter what I specifiy as the <select> font size, the <option> list seems to do its own thing. This happens in Firefox or I.E.
<html>
<head>
<style type="text/css">
select { font-size: 22pt }
</style>
</head>
<body>
Testing Stuff
<select>
<option>The rain in Spain Falls Mainly in the Plain</option>
<option>Four score and 20 years ago our Fathers brought Forth</option>
<option>The quick brown fox jumps over the lazy dog</option>
</select>
</body>
</html>

Open in new window

Small fonts on <option> list
0
Comment
Question by:jmarkfoley
  • 6
  • 4
  • 2
12 Comments
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 250 total points
ID: 41811313
Not sure but I think you need to set the size on the option, not the select, something like:

<style type="text/css">
option { font-size: 22pt }
</style>

You may still need  the "select { font-size: 22pt }", but without testing I don't think you do.
0
 
LVL 43

Assisted Solution

by:zephyr_hex (Megan)
zephyr_hex (Megan) earned 250 total points
ID: 41811316
Try targeting the select's child options:

select > option { font-size: 22pt }

Open in new window


Here is a Fiddle Demo:  https://jsfiddle.net/zephyr_hex/tggj3t42/
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 41811338
giltjr: I tried option { font-size: 22pt}, didn't work.

zephyr_hex: That does appear to work on the fiddle demo, but not on my page. Where does that style line go?

here's what I have now:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
select { font-size: 22pt }
select > option { font-size: 22pt }
</style>
</head>
<body>
Testing Stuff
<select>
<option>The rain in Spain Falls Mainly in the Plain</option>
<option>Four score and 20 years ago our Fathers brought Forth</option>
<option>The quick brown fox jumps over the lazy dog</option>
</select>
</body>
</html>

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 57

Expert Comment

by:giltjr
ID: 41811349
Just tested this and it worked under FF 49.0

<html>
<head>
<style type="text/css">
select { font-size: 22pt }
option { font-size: 22pt }
</style>
</head>
<body>
Testing Stuff
<select>
<option>The rain in Spain Falls Mainly in the Plain</option>
<option>Four score and 20 years ago our Fathers brought Forth</option>
<option>The quick brown fox jumps over the lazy dog</option>
</select>
</body>
</html>
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 41811364
Actually, it is working on other computers, just not on a particular workstation I'm testing with. I reinstalled Firefox on that computer, but it didn't help. I see this font-shrinkage now only with Firefox, not IE. I'll try re-installing Firefox again and report back.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 41811374
O.K., I also tested in with Chrome 53.0.2785.116 and IE 11 and it worked.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 41811407
I removed and reinstalled Firefox, and deleted the Firefox folders in AppData and I still have the problem on this computer only. I'll contact Mozilla and see if they know what's going on.
0
 
LVL 43

Expert Comment

by:zephyr_hex (Megan)
ID: 41811476
Make sure you F5 refresh when changing CSS elements.  Firefox in particular will sometimes cache a page and not bring in the most recent CSS changes.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 41811920
This is apparently a known bug: https://bugzilla.mozilla.org/show_bug.cgi?id=910022, going back 3 years.

It showed up when these users were updated to version 49.0. Both users still have the shrunken fonts on <options>. This problem does not show up on 48.0.2.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 41812272
That is weird because I'm using FF 49.0 and it works for me.

Select Option w/Font-Size=22 FF 49.0
0
 
LVL 1

Accepted Solution

by:
jmarkfoley earned 0 total points
ID: 41818737
The problem is fixed in Firefox's latest update, 49.0.1
0
 
LVL 1

Author Closing Comment

by:jmarkfoley
ID: 41825234
Fixed by Mozilla
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML <font style="color:red"> 9 51
HTML auto refresh to another site 4 28
Read text on Table 7 25
How to get chosen background-color on every line? 10 14
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question