Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

860 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