Does anyone know of a code I could use to make sentences all the same width so they don't look so messy on my website?
<p style="text-align:justify;"> Your sentences here.<br /> More sentences here...<br /> Even more sentences here...<br /> and so-on and so-forth.<br /> </p> This is the only bit of code that you need: "text-align: justify;" but I wrote the above assuming you don't know CSS or how to implement that in your site.
Put it in the stylesheet against the name of the div/ cell etc that holds the comments or as a class that these use
After doing this, though, take a second look at your text. Depending on what the width is, sometimes t h e t e x t g e t s v e r y h a r d t o re ad. A change in font might be in order after text-justify. Just to warn you : )
cautious editing goes a long way to. as Stomme poes pointed out when you justify a block of text you end up with gaps and spaces between lines that designers call "snakes" or "rivers" and the solution is manual letterspacing and kerning.....which can't be done in CSS. I would try to avoid justified text unless it's a lot of text with very very long line lengths (like full-page width)
You can't set kerning, but you can set letterspacing in CSS, as well as wordspacing. letter-spacing: .5em; word-spacing: 2em; No percentages allowed, and of course this person would not want to use these for this particular problem, but it's a nice tool, esp for design : ) Another option that I have JUST learned about a few days ago on another forum is called the soft hyphen. You stick it where, if a word needs to be broken, a hyphen would be appropriate. Not supported by FF2, but there was a way around that. & shy; or &# 173; (spaces added so they render). Also nice to have.
I find it very difficult to read when people do this. Your better of using divs and keeping everything evenly spaced. For example on 100% width use 4 25% boxes. Things like that.
I've used this on quite a few designs for people who wanted it, and I've never seen i t s p a c e t h e t e x t o u t t h i s b a d l y... It spaces each line about a word's width, and the final line just doesn't go all the way to the end. Although, you guys are right, he has to have alot of text to do it with or it will be just horribly messy.
It seems to depend on the font, whether or not i t s p a c e s o u t so bad. It also depends on the width of the container. It seems to me that using text-justify on a container as wide as the page would have less problem than in a container only 150px wide.
Pretty much - though you REALLY have to take 'justify' on a case by case basis. For 12px text 320px seems about right for most text - you can do the math to scale that up - though excessively long words can throw it completely out of whack - it also varies from font to font as not all fonts kern the same.
Justify is for newspapers or column articles. Is this for main content reading on your site? I would not use justify is that is the case.