Closed
Bug 13562
Opened 26 years ago
Closed 26 years ago
select elements ignore 'size' when parent has padding
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
People
(Reporter: ian, Assigned: rods)
References
()
Details
Select elements treat their 'size' attribute very oddly when their parent has
padding. They seem to decide to have a height which is a multiple of the size
and some other figure, and inherit the padding of their parent (!). This is
very odd to look at.
Furthermore, the padding-left is then carried through to the padding-right (!)
forcing, if the padding-left is bigger than the -right, a scroll bar to appear.
A similar oddity occurs with the -top and -bottom paddings.
For example:
<p style="padding: 2em">
<select size=4>
<option>a</option>
<option>b</option>
<option>c</option>
<option>d</option>
<option>e</option>
<option>f</option>
<option>g</option>
</select>
</p>
In the above, the select element gets 2em padding between its frame and its
options, and has a huge height. This is visible on the following test pages:
http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/selectsize.html
http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/optgroup.shtml
Explicitly setting the padding on SELECT or OPTION seems to have little or
no effect.
Updated•26 years ago
|
Assignee: karnaze → rods
Comment 1•26 years ago
|
||
Reassigning to Rod.
Assignee | ||
Comment 2•26 years ago
|
||
I thought there was a bug on this already, but I guess not. I did mention this
in some check in message. Yes, we don't obey padding or borders and it is a bug
problem (code wise) on trying to make this happen.
Basically, if you set the border and padding on a select the dropdown picks
those style settings and messes all the sizing up. So I will keep this bug open
to track this problem, this probably won't be fixed for beta.
Reporter | ||
Comment 3•26 years ago
|
||
rods: I'm not setting padding on the SELECT. I'm setting it on its parent.
Reporter | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 4•26 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•