PDA

View Full Version : Formatting Text: All Lines or Nothing!


chome4
01-02-2011, 06:51 PM
Another newbie question!

Just pasted a block of text into a box. When I select the first line and attempted to justify it centre, the entire block moved to the centre. Seems that every line is 'locked' to perform the same way when formatting.

The initial page was set up by a friend who's 'been on a course'. How can I treat this block of text in the same way as you would in a word-processor program?

edbr
01-03-2011, 12:07 AM
post your code

DWcourse
01-03-2011, 01:41 AM
How can I treat this block of text in the same way as you would in a word-processor program?

You should understand that designing for the web isn't like using a word-processor program. Centering is applied to blocks (paragraphs, divs, the entire body of the page etc.). So to center just one line it needs to be its own paragraph or the only line in a div.

chome4
01-03-2011, 03:12 AM
Here's the page as it looks: http://gmjones.org/john/index.html

edbr
01-03-2011, 03:27 AM
you are repeating div id, dont, use class.
i would put your text in <p> paragraph tags and then use styles to modify the look of the paragraph

DWcourse
01-03-2011, 03:59 AM
just a further note. Line breaks don't start a new paragraph they just move you to a new line. You can't really format a line created by a break <br /> separate from the paragraph it's part of.

Corrosive
01-03-2011, 08:51 AM
I found this today about semantic markup. It is very comprehensive and should help you achieve good Search Engine results; http://blue-anvil.com/archives/guide-to-semantic-mark-up/

That aside you should have your hedaers in a header tag and text in a paragraph as the guys have said something like;

<h2>London Society of Chartered Accountants (LSCA).</h2>
<p> An open 'pastoral' invitation to London-based Chartered Accountant members of the Institute of Chartered Accountants in England &amp; Wales (ICAEW) to contact me as their London ICAEW Council or LSCA representative.</p>
<p> My Intention is to assist my constituents; Chartered Accountants living and working in London.</p>
<p>Constituents can email me anytime on any ICAEW or LSCA matter.</p>
<p>Please click on the LSCA button for further information. <p>

Then style tags with CSS;

h2 {text-align: center;}
p {text-align: left;}


That is a very simple demo but get the idea that web is like Microsoft Word out of your head now. It isn't. There is a lot more to learn about markup and CSS.

chome4
01-03-2011, 06:20 PM
Thank you.

d a v e
01-03-2011, 06:38 PM
and don't underline text unless it's a link - if it's a heading or similar and you want some separation then use a bottom border.