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)

x86
Windows 98
defect

Tracking

()

VERIFIED DUPLICATE of bug 1939

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.
Assignee: karnaze → rods
Reassigning to Rod.
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.
rods: I'm not setting padding on the SELECT. I'm setting it on its parent.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Yup, there is a bug already open on this: bug 1939. Marking as DUP. *** This bug has been marked as a duplicate of 1939 ***
cleaning up: VERIFY duplicate
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.