?
Solved

Tab character in JSp

Posted on 2004-11-22
9
Medium Priority
?
4,454 Views
Last Modified: 2013-12-03
I need to allign entries in HTML Option Value box the following way:

October 09, 2004        02:25 AM
September 21, 2004      10:44 PM
March 24, 2004      00:23 AM

HTML code is composed inside JSP.
Using spaces does not work, and HTML does not understand tab character.
Any help will be greatly appreciated.
0
Comment
Question by:burevestnik
7 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 500 total points
ID: 12649578
You're not going to be able to do that, AFAIK, as each browser can be using a different font, which would break any spacing you manage to get into it...

I would either do;

a)  An html table that you can select a row of
b)  Have a select that shows extra data (in a space next to the select) when an item is selected
0
 
LVL 28

Expert Comment

by:rrz
ID: 12651049
>Using spaces does not work, and HTML does not understand tab character  
You can use the non-break space character.  Use       or    
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12652531
But you won't guarantee 100% alignment on 100% of browsers...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Expert Comment

by:punithapr
ID: 12656808
Hi burevestnik

You can use either   for five times,

or u can use div tag to specift ur style and padding to that

ex : <DIV
            style="PADDING-LEFT: 10px; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: arial">
ur text
</div>

Thanks
Punitha
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12656842
how does that line up columns in an HTML select?

that just adds padding to the left hand side of the select...

Tim
0
 
LVL 1

Expert Comment

by:punithapr
ID: 12657005
yes, U are right

Punitha
0
 
LVL 6

Assisted Solution

by:PeterCiuffetti
PeterCiuffetti earned 500 total points
ID: 12668643
Here's some HTML that will align using monospace font family and &nbsp; as the space character:

<html>
      <head><title>Option alignment</title></head>
      <body>
            <h1>Demonstration of option alignment</h1>
            <form action="." method="get">
                  <p>Unaligned</p>
                  <select name="op1">
                        <option value="1">October 09, 2004       02:25 AM</option>
                        <option value="1">September 21, 2004     10:44 PM</option>
                        <option value="1">March 24, 2004     00:23 AM</option>
                  </select>
                  <p>Line up the times</p>
                  <select name="op2" style="font-family:monospace;">
                        <option value="1" selected="selected">October 09, 2004&nbsp;&nbsp;&nbsp;02:25 AM</option>
                        <option value="2">September 21, 2004&nbsp;10:44 PM</option>
                        <option value="3">March 24, 2004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00:23 AM</option>
                  </select>
                  <p>Align the days</p>
                  <select name="op3" style="font-family:monospace;">
                        <option value="1" selected="selected">October&nbsp;&nbsp;&nbsp;09, 2004 02:25 AM</option>
                        <option value="2">September&nbsp;21, 2004 10:44 PM</option>
                        <option value="3">March&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24, 2004 00:23 AM</option>
                  </select>
                  <br>
                  <input type="submit" name="submit"/>
            </form>
      </body>
</html>
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
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 Month15 days, 22 hours left to enroll

850 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