Solved

option tag entries appear in small font

Posted on 2016-09-22
12
19 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 42

Assisted Solution

by:zephyr_hex
zephyr_hex 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 42

Expert Comment

by:zephyr_hex
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now