PDA

View Full Version : formatting text


walkamongus
01-09-2009, 02:43 AM
hi all, im wondering if anyone has any tricks for formatting text inside of divs. im working with a fairly huge article ive pasted inside a div and getting the right edge to line up reasonably is a bit of a pain. doing it in design mode is useless because it doesnt look nearly the same in a browser, and i dont know of any other way besides editing in code view, checking in browser, editing in code view, repeat.

is there some sort of setting that will end lines somewhat appropriately?



any help is appreciated!

edbr
01-09-2009, 03:11 AM
you want to align text to the right?
in the style for that division add text-align:right;
you can do this using the css panel if you are uncomfortable with code , but you should venture into it as it is not as bad as it looks at first

coloeagle
01-09-2009, 02:54 PM
Adding to what Ed mentioned, if you want the text to be equal left and right;
Set your padding equal and use text-align:justify; Justify will space the words/letters out to fill in the div equally left and right.

walkamongus
01-09-2009, 11:34 PM
you can do this using the css panel if you are uncomfortable with code , but you should venture into it as it is not as bad as it looks at first

true, im really starting to jump into code more and more as i am realizing the limitations of design view... thanks for the encouragement!


Adding to what Ed mentioned, if you want the text to be equal left and right;
Set your padding equal and use text-align:justify; Justify will space the words/letters out to fill in the div equally left and right.

thanks coloeagle this is exactly what i need! huge time-saver


-tim

d a v e
01-10-2009, 10:25 AM
be careful using justify though as it is pretty clumsy in browser compared to desktop publishing software for exmaple. it's also supposedly harder for people with dyslexia to read, and you can generally end up with some quite strange lines with words being stretched all over the place! ;)

Corrosive
01-10-2009, 11:12 AM
be careful using justify though as it is pretty clumsy in browser compared to desktop publishing software for exmaple. it's also supposedly harder for people with dyslexia to read, and you can generally end up with some quite strange lines with words being stretched all over the place! ;)

I'm with you Dave. I tried to use justify text in sites and it looks great in some browsers and on some OS but it can look really, really bad in others. Make sure you check a sample page at browsershots.org

walkamongus
01-10-2009, 08:48 PM
hmm i have indesign but i must admit i havent found a use for it yet. is there a relatively simple way to get the text formatted properly for a specific size div?

ps thanks for the browsershots tip, i will definitely start running my stuff through it!

d a v e
01-10-2009, 09:11 PM
using indesign wouldn't make any difference as the appearance of the text in a browser only depends on the mix of html (and any css) and how the browser renders it.
the only control you have over it is to choose the type of justification: i.e. left, center, right, fully justified.
indesign is a layout app for making documents for publishing - posters, newsletter, books, magazines...

walkamongus
01-10-2009, 09:22 PM
sorry i misunderstood... must be the dyslexia :mrgreen:

walkamongus
02-03-2009, 12:43 AM
hey everybody, im running into a problem and its starting to get on my nerves!

1. when i justify text inside a div the sides are ok but the way it spaces out the words is unacceptable!

2. when i align-left the word spacing is ok but i could saw wood with the right side of the paragraph!

what i would like reasonable spacing all around... any insight is welcome!

coloeagle
02-03-2009, 01:30 AM
1. when i justify text inside a div the sides are ok but the way it spaces out the words is unacceptable!

2. when i align-left the word spacing is ok but i could saw wood with the right side of the paragraph!

what i would like reasonable spacing all around... any insight is welcome!
Words spreading out is the problem with justify.

Aligning left you can modify the width of the div or modify the padding used for the sides.