Questions tagged [justify]

A text alignment mode where every line has the same width

A text alignment mode of layout engines where words separated by spaces become evenly distributed so every line starts and ends at the same horizontal position (except the last line, which may not fill if its content is too short)

331 questions
466
votes
22 answers

Android TextView Justify Text

How do you get the text of a TextView to be Justified (with text flush on the left- and right- hand sides)? I found a possible solution here, but it does not work (even if you change vertical-center to center_vertical, etc).
user130076
70
votes
12 answers

How to stretch a fixed number of horizontal navigation items evenly and fully across a specified container

I'd like to stretch 6 nav items evenly across a 900px container, with an even amount of white space between. For instance... ---| 900px Container |--- ---| HOME ABOUT BASIC SERVICES SPECIALTY SERVICES OUR STAFF CONTACT US…
timshutes
  • 2,259
  • 3
  • 22
  • 28
53
votes
8 answers

"text-align: justify;" inline-block elements properly?

A few other questions have already addressed how best to apply text-align: justify to get inline-block elements to spread out evenly… for example, How do I *really* justify a horizontal menu in HTML+CSS? However, the 100% width element that "clears"…
thirdender
  • 3,891
  • 2
  • 30
  • 33
51
votes
5 answers

How can I align text directly beneath an image?

I used to know how to put an image on top and then justify the text below the image so that it stays within the borders of the width of the image. However, now I have no idea how to do this. How is this accomplished?
Andie
50
votes
10 answers

How do I justify a horizontal list?

I have a horizontal navbar like the following: I use CSS to remove the bullet points and make it…
Maxpm
  • 24,113
  • 33
  • 111
  • 170
44
votes
9 answers

Justify the last line of a div?

I don't think the "why?" of this question is important...but what I need to do is to text-align:justify the last line of text from a DIV. Normally, the last line (or the first if there are no other lines, which is the current case) of a div isn't…
JCOC611
  • 19,111
  • 14
  • 69
  • 90
36
votes
3 answers

How to left justify text in Bash

Given a text, $txt, how could I left justify it to a given width in Bash? Example (width = 10): If $txt=hello, I would like to print: hello | If $txt=1234567890, I would like to print: 1234567890|
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
31
votes
10 answers

CSS text justify with letter spacing

Is there a way to automatically justify words using letter spacing, each in its row, to a defined width, using CSS? For example, "Something like this" would look, well, something like this: Is there a non-obtrusive way to apply such styling to my…
vgru
  • 49,838
  • 16
  • 120
  • 201
27
votes
2 answers

Why does display: -ms-flex; -ms-justify-content: center; not work in IE10?

Why doesn't the following code work in IE10? .foo { display: -ms-flex; -ms-justify-content: center; } What do I need to write in order for them to work?
user2590633
  • 283
  • 1
  • 3
  • 5
25
votes
9 answers

CSS text align justify big spaces

To format paragraphs I use text-align:justify, but I have one problem that there are big spaces between words, for IE the solution is to use text-justify: distribute;, but Chrome doesn't support this, my question is what should I use for Chrome and…
Wizard
  • 10,985
  • 38
  • 91
  • 165
22
votes
7 answers

Right justify text in AlertDialog

Is it possible to right-justify the text in an AlertDialog's title and message? I am showing Hebrew messages but they are showing up left justified.
theblitz
  • 6,683
  • 16
  • 60
  • 114
17
votes
7 answers

Justify Text in a HTML/XHTML TextArea

I am currently trying to justify text in a textarea, unfortunately the CSS: text-align: justify; Doesn't work on the text like center, left and right do. I've tried this in both Firefox 3 and IE 7 with no luck. Is there any way around this?
Matt
  • 494
  • 1
  • 5
  • 13
13
votes
3 answers

Can I use CSS to justify text with hyphenating words at the end of a line?

I have a div that is too narrow to text-align:justify (gaps too wide), but yet looks un-uniform when right- or left-justified, because then there is a large gap at the end of lines. Left-justified looks best, but could I use hyphenation, like in…
user1158415
12
votes
0 answers

Justify multiline text in ggplot2 - title, subtitle, caption, geom_text() etc

I would like to justify (not just align!) multiline text in my ggplots, i.e. mostly title, subtitle, caption and annotations via geom_text() etc. Justified Text To be clear, by "justified text" I mean adding space between words so that both edges of…
Paul Schmidt
  • 1,072
  • 10
  • 23
12
votes
2 answers

Is there a way to justify-align floating HTML elements with CSS?

Essentially, I'm trying to achieve the affect of "text-align:justify" but with floating block elements. I have many blocks that I want to justify-align. Ie. each line is horizontally-spaced differently to make sure lengths of each line are the…
rocketmonkeys
  • 5,473
  • 5
  • 28
  • 21
1
2 3
22 23