<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>40216</bug_id>
          
          <creation_ts>2010-06-06 17:59:11 -0700</creation_ts>
          <short_desc>text-align doesn&apos;t work on select tags</short_desc>
          <delta_ts>2024-03-06 15:11:05 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=133373</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Julien">julien</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>ap</cc>
    
    <cc>aragost</cc>
    
    <cc>bugzilla</cc>
    
    <cc>dante3333</cc>
    
    <cc>determinedc1</cc>
    
    <cc>doug</cc>
    
    <cc>ekadesign</cc>
    
    <cc>heycam</cc>
    
    <cc>mitz</cc>
    
    <cc>norsyn</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>234699</commentid>
    <comment_count>0</comment_count>
    <who name="Julien">julien</who>
    <bug_when>2010-06-06 17:59:11 -0700</bug_when>
    <thetext>Hi,

If I&apos;m doing something like &lt;select style=&quot;text-align: right;&quot;&gt; … options … &lt;/select&gt; the text content is still align to the left.
Whatever I&apos;m trying to do, with css rules on select or options it always aligns to the left.
It doesnt work neither on latest Chrome but it does with Firefox…

Julien</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234700</commentid>
    <comment_count>1</comment_count>
      <attachid>57987</attachid>
    <who name="Julien">julien</who>
    <bug_when>2010-06-06 18:09:28 -0700</bug_when>
    <thetext>Created attachment 57987
Test case to see if selects are aligned or not</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234701</commentid>
    <comment_count>2</comment_count>
    <who name="Julien">julien</who>
    <bug_when>2010-06-06 18:10:25 -0700</bug_when>
    <thetext>Latest WebKit, Safari and Chrome failed on this but this works on both Firefox and Opera Mac versions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234719</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-06-06 22:26:50 -0700</bug_when>
    <thetext>Somewhat surprisingly, I cannot find an exact duplicate for this. There are bug 38780 and bug 19785 though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234881</commentid>
    <comment_count>4</comment_count>
    <who name="Julien">julien</who>
    <bug_when>2010-06-07 09:17:07 -0700</bug_when>
    <thetext>Yeah I searched a bit and was surprised too...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403619</commentid>
    <comment_count>5</comment_count>
    <who name="Paul">bugzilla</who>
    <bug_when>2018-03-05 07:30:18 -0800</bug_when>
    <thetext>Based on mitz&apos;s comment in bug 19785 that &quot;We are not going to center or justify menu items on Mac OS X&quot;, should this not be closed as WONTFIX?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1754562</commentid>
    <comment_count>6</comment_count>
    <who name="Nicolas H.">dante3333</who>
    <bug_when>2021-04-27 05:53:02 -0700</bug_when>
    <thetext>Any update? This is really painful to be blocked for such things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799864</commentid>
    <comment_count>7</comment_count>
    <who name="Peter B">norsyn</who>
    <bug_when>2021-10-03 10:14:50 -0700</bug_when>
    <thetext>I believe I found an answer to this. Try CSS code &quot;direction rtl;&quot; on the &quot;select&quot; element. Ditto to driving you crazy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799865</commentid>
    <comment_count>8</comment_count>
    <who name="Peter B">norsyn</who>
    <bug_when>2021-10-03 10:19:26 -0700</bug_when>
    <thetext>Furthermore, if you want the select text to be to the right but then the options to be on the left you can do something like this:

.select:active {
    direction: ltr;
}

This will essentially change the css for the select element for when it is active - i.e. when you are making a selection.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846076</commentid>
    <comment_count>9</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-02-25 10:32:55 -0800</bug_when>
    <thetext>&lt;rdar://5847174&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019201</commentid>
    <comment_count>10</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2024-03-06 15:11:05 -0800</bug_when>
    <thetext>We cannot change the text alignment of menu items, but we should honor text-align for the in-page control. This would match the behavior of both Chrome and Firefox.

Would require changes in `RenderMenuList::adjustInnerStyle`.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>57987</attachid>
            <date>2010-06-06 18:09:28 -0700</date>
            <delta_ts>2010-06-06 18:09:28 -0700</delta_ts>
            <desc>Test case to see if selects are aligned or not</desc>
            <filename>test-select.html</filename>
            <type>text/html</type>
            <size>1266</size>
            <attacher name="Julien">julien</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIg
Imh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPgo8aHRt
bD4KCTxoZWFkPg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