Solved

option tag entries appear in small font

Posted on 2016-09-22
12
25 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 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
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
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 basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

623 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