Solved

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

Posted on 2008-10-17
1
4,574 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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now