EDIT: See bottom for screen shots:
I'm just wondering if anyone has come across a similar issue. On my machine, Windows 8 and latest version of Chrome, my select box options all look the way I would expect in terms of vertical spacing. On the developer beside me, also running Windows 8 with the same version of Chrome, the select box options appear to have 5px to the top and bottom of padding. The code is on our development server so we're accessing the same files.
Here's a jsfiddle reproducing the issue on the other developer's machine: http://jsfiddle.net/3etfP/
And here's a test case (same a jsfiddle):
<style type="css">
.select {
padding: 3px;
color: #000;
}
</style>
<div>
<select name="testSelect" id="testSelect" class="select">
<option value="-1">Select One</option>
<option value="0">No</option>
<option value="1">Yes</option>
</select>
</div>
Some other details that may be of use:
- Both running Windows 8.0 64bit
- Both using Desktop mode
- Both using Version 30.0.1599.101 m of Google Chrome
- Using the following Chrome extensions:
- URL-alizer (both)
- Google Hangouts (both)
- Right inbox for Gmail (me)
- Any.do (other dev)
- Quick Notes (other dev)
- Google Docs (both)
Please let me know if there are any details I've missed.
Thanks
Select with padding:
Select appearing normally:
Scott,
If this is something really important, you could mimic the behavior of a select with a div and have better control. That being said it may not be padding, have you tried setting the
margin: 0
on the<option>
elements?Most elements have their own padding/margin in different browser. I would recommend using a CSS reset if you want uniform design across all browsers (see here). It could also be that either of you have Chrome zoomed in. Both of you should hold
control
and press+
or-
to make sure the zoom is set to 100%.Edit: I think you are in for it unfortunately. See Chris Coyier's article Dropdown Default Styling, especially the latter part of the article, most of which is quoted here.
Joshua