Floating options is inconsistent with other browsers

RESOLVED WORKSFORME

Status

()

Core
Layout: Form Controls
RESOLVED WORKSFORME
11 years ago
11 years ago

People

(Reporter: Adam van den Hoven, Unassigned)

Tracking

1.8 Branch
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

Without thinking about it, I did something like "div.container *{ float:left;}" which is no big deal. Except that I'm doing this to part of a form that includes a select. Oddly enough, the options take on the float behaviour.

I don't really have a problem with this except that its inconsistent with the behaviour of all other browsers (who typically use a OS widget for select, making it a replaced element). 

Because selects take on the width of their largest row, floating the elements results in a very wide select. Also a problem. 

Reproducible: Always

Steps to Reproduce:
1.Create an HTML page with an select and some number of options and set the options to float left.
2. View the page
Actual Results:  
The options appear inline. 

Expected Results:  
selects should be a vertical list of options

The following markup illustrates the weirdness:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<style type="text/css" media="screen">option{float:left;}</style>
</head>
<body>
<select>
	<option>Option 1</option>
	<option>Option 2</option>
	<option>Option 3</option>
	<option>Option 4</option>
	<option>Option 5</option>
	<option>Option 6</option>
</body>
</html>
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: unspecified → 1.8 Branch

Comment 1

11 years ago
Created attachment 247155 [details]
test case from reporter

I can reproduce this with Firefox 2.0 (all options aligned on one line), but the testcase works correctly with the most recent trunk builds.
This was fixed on trunk (on 2006-07-25) by the fix for bug 343510.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.