Re: input element - absolute positioning - determing width with left and right

On Thu, 31 Aug 2006 15:20:48 +0100, Spartanicus  
<spartanicus.3@ntlworld.ie> wrote:
>> <input type="text" style="position: absolute; left: 0; right: 0;">
>>
>> How should that be rendered?
>
> http://www.w3.org/TR/CSS21/conform.html#conformance
> "CSS 2.1 does not define which properties apply to form controls and
> frames, or how CSS can be used to style them. User agents may apply CSS
> properties to these elements. Authors are recommended to treat such
> support as experimental. A future level of CSS may specify this
> further."

So form controls are currently treated a bit like replaced elements, much  
like images and per the specification they should just get their intrinsic  
width for the above case. For example

   <img height="200" width="200" src="..." alt="...">

absolutely positioned with 'left' and 'right' set to zero will still get a  
width of 200px.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Saturday, 2 September 2006 10:19:58 UTC