> Form controls are replaced elements (like inline images, basically), and thus sorta-kinda inline-block elements. > Can't come up with the exact reference, but is noted in the HTML5 spec. OK, thanks. More info here: http://www.w3.org/TR/CSS21/conform.html#replaced-element. More specifically, it says they are outside the scope of the visual formatting model. Which, I believe, means that `overflow:hidden` is basically ignored as it relates to these replaced elements, as they will always be the width that is declared. Take, for instance, an image: applying a width and overflow:hidden will only get you a smaller image - it will not display a portion of the image.
On Tue, Oct 8, 2013 at 10:26 AM, Philippe Wittenbergh <[email protected]>wrote: > > Le 8 oct. 2013 à 23:15, Chris Rockwell <[email protected]> a écrit : > > > I had to look into this more: it doesn't make sense to me that an element > > with `display:inline` declared would still honor an explicit width. I > have > > tested this in all modern browsers, and the form elements seem to be > immune > > to inline display when it comes to dimensions. > > Form controls are replaced elements (like inline images, basically), and > thus sorta-kinda inline-block elements. > Can't come up with the exact reference, but is noted in the HTML5 spec. > > PS - width does not apply to inline elements per the spec: > http://www.w3.org/TR/CSS21/visudet.html#propdef-width > But you knew that already… > > Le 8 oct. 2013 à 21:09, Alan Gresley <[email protected]> a écrit : > > > For the overflow hidden inline-block, add a negative bottom margin that > equals the padding and vertical-align: bottom. This will make it close but > it will be out if the border-bottom or padding-bottom are given in pixels. > > > Nice trick with the negative margin-bottom! > If it matters to Christian to have the blocks with the overflow:hidden > descendants the same height as those without, applying a little padding to > the parent (equal to the margin) will do that. > > > > Philippe > -- > Philippe Wittenbergh > http://l-c-n.com > > > > > -- Chris Rockwell ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
