Solved

option tag entries appear in small font

Posted on 2016-09-22
12
22 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

839 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