Solved

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

Posted on 2008-10-17
1
4,637 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
[X]
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
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

726 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