Liad Livnat
Liad Livnat

Reputation: 7475

CSS Justify a single word in a table

I'm facing the following scenario:

I have table with column that there is only one word in it mac-address. sometimes mac address can contain more letters than digits, so it make the length of the word different. for example : 00:1B:1B:BA:0D:AB vs 00:1B:1B:1E:0F:A8

I'm looking for solution to make the words take the same width,

already tried to use:

text-align: justify;

and

letter-spacing: 2px;

is anyone have an idea ? attaching an image to show the described above.

enter image description here

Upvotes: 1

Views: 222

Answers (2)

wokati
wokati

Reputation: 29

You could use a Monospaced font, that way every character will have the same width.

Upvotes: 1

Babtek
Babtek

Reputation: 81

The simplest solution here would be to use a monospace font, probably with a CSS rule.

font-family:monospace;

Upvotes: 1

Related Questions