Solved

Character width with CSS

Posted on 2006-06-25
2
1,983 Views
Last Modified: 2013-12-03
How can I format the following text block so that the amounts line up vertically?

<div id="textblock">
Extra Adult........................£40<br>
Extra Child (11-16).............£20<br>
Extra Child (2-10)...............£10<br>
</div>

It appears that the '.' character is a different width to the numeric '1' .

Thanks
0
Comment
Question by:chrisfixit
2 Comments
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 16978217
your data is tabular data, so you should use a <table>.
then you can use a background image to show the dots.
0
 
LVL 4

Accepted Solution

by:
noamattd earned 500 total points
ID: 16984022
Use a monospace font like Courier new, where each character is the same width.  The easier(and probably better) way is to place the information in a table, eliminate the need for the dots altogether.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Safari SVG Image Problem 1 39
Phone Dialer 5 60
Autoprefixer and text editors 1 23
CSS change width browser switches to mobile view 2 45
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
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…

930 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

12 Experts available now in Live!

Get 1:1 Help Now