W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: <option> and text-align

From: Aharon (Vladimir) Lanin <aharon@google.com>
Date: Wed, 19 Jan 2011 18:11:10 +0200
Message-ID: <AANLkTikyUrxdQT98tvZgx_P4-Bqj31_4bON_AApE-VFM@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: W3C style mailing list <www-style@w3.org>
See below

On Wed, Jan 19, 2011 at 5:18 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 1/19/11 9:56 AM, Aharon (Vladimir) Lanin wrote:
>> Firefox behaves as if the option's default text-align is "start"
> No, it really doesn't, if you're talking about the default specified value.
>  Simple testcase:
> data:text/html,<select style="text-align:
> end"><option>a<option>bbbbb</select>

Well, it does seem to inherit from the <select>, but not from a parent of
the select. Try:

data:text/html,<div style="text-align:

The "a" option still comes out left-align (i.e. start-aligned), even though
the select is on the right side of the page.

> That said, none of your testcases set text-align, and Gecko currently
> inherits the "start" value as "start", so in fact everything on a page has a
> computed text-align of "start" by default.  Unless someone sets some
> text-align styles somewhere.

I do not know what you mean. Here is the content of my attachment. Note the
text-align on body and on several of the option elements.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body dir=rtl style="text-align:center">
<option style="text-align:left">שמאל!</option>
<option style="text-align:left">left!</option>
<option dir=ltr>ltr!</option>
<option style="direction:ltr">direction ltr!</option>
<option dir=ltr style="text-align:left">ltr left!</option>

> -Boris
Received on Wednesday, 19 January 2011 16:11:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:42 UTC