Solved

Character width with CSS

Posted on 2006-06-25
2
1,977 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
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.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

743 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

11 Experts available now in Live!

Get 1:1 Help Now