Solved

HTML SELECT with text-align: right; does not work in Internet Explorer

Posted on 2008-10-17
1
4,599 Views
Last Modified: 2013-12-08
I have an HTML SELECT that needs to be right-aligned. When I use text-align: right; it works in Firefox, but not in IE.

I googled a bit and the options I had were:

1. Complete the left side with blank spaces;
2. Use dir="RTL";
3. Use a DHTML select.

I'm not allowed to use solution #2. Solution #1 is a bit messy. Can't use Solution #3 either, unless there's a way to make the DHTML select look exactly like the regular HTML select.

Are there any other ways I could do this?

Thanks!
0
Comment
Question by:brunoguimaraes
1 Comment
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 22745431
IF you mean a select list -- like a drop-down options list -- they are ALWAYS left aligned, there is no native HTML support for centering or right align, and only the odd modern browser will respect right align.

Padding is your best bet with   to get this to render right aligned in all browsers.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question