Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

option tag entries appear in small font

Posted on 2016-09-22
12
Medium Priority
?
26 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
12 Comments
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 1000 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 44

Assisted Solution

by:zephyr_hex (Megan)
zephyr_hex (Megan) earned 1000 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
Industry Leaders: 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 44

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

688 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