[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


align the font of a drop down list box to center

Posted on 2005-04-24
Medium Priority
Last Modified: 2013-12-03

how can we align the font of a drop down list box to center?  (asp.net vb)

Question by:EdwardPeter
1 Comment

Accepted Solution

stengelj earned 2000 total points
ID: 13855174
The <asp:listitem> won't let you do this.  Even if it did, IE would not recognize the 'center' attibute.  I think the best you can hope for is the following. It works in FireFox but not IE:

<select ID="mySelect" runat="server">
    <option value="1" style="text-align:center" >This</option>
    <option value="2" style="text-align:center" >This is</option>
    <option value="3" style="text-align:center" >This is a </option>
    <option value="4" style="text-align:center" >This is a test</option>

Maybe someone else knows a way, but I've been down this road before and I don't think it can be done (and still be suported by the major browsers).

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month19 days, 15 hours left to enroll

873 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