|
Text alignment problem
|
Logged in as: Guest
|
Name: | |
|

newseed
Posts: 833
Member since: 1/13/2005
From: Florida

|
RE: Text alignment problem (in reply to bdude)
|
|
|
quote:
ORIGINAL: bdude Yeah, I figured that's what you meant. Sorry I didn't catch it at first. http://www.min7th.com/ahs/jm08frwmem3.html I go thru this often checking the html code to see if there is anything affecting it, but can never find anything. Hope you can. Regards Looks like you need to get familiar with your code that FrontPage is producing or else you are going to have more problems than care to deal with. Firstly, FrontPage is poor at creating standard codes. <font>, <b> and a few other tags are deprecated (no longer valid). Secondly, you have two sets of <body></body> and <html></html> tags. You only need one set. This could present some problems. Thirdly, you need a doctype to tell each type of browser how to render the page. HTML 4.01 Strict is ideal and preferred. XHTML 1.0 Strict is preferred if you are planning to parse XML. Even if you use the latter it's still not fully supported by IE. Forthly, you used align="justify" in your table cell. This is not supported by IE. Use this instead - style="text-align:justify;". Keep in mind that it makes reading a bit more difficult where you finish one line and try to pick up the next. It might be okay for a paragraph or a phrase but for continous reading is not ideal. Finally, it's time to learn CSS. Althought it takes just a bit more time to get familiar on how it works and implement, you will find that you will use far less code in the HTML and easier to managed and update. Take the example above: <td height="16" style="text-align:justify;"> You will have to apply this to each and every table cell that you require to jusitify the text. Instead you can use CSS to style one page or the entire site. It's ideal and preferred to use External CSS so that you can manage the whole site. So by using CSS it will look something like this: CSS page: td { text-align:justify;} and the HTML will look like this: <td height="16"> This will justify all text within any of the table cells. Of course this would present a problem for text you do not wish to justify. Maybe you like to keep your heading title centered and all other text justified. This is where you proper semantics such as <h1> (heading) and <p> (paragraph) tags helps you achieve the results you desire...easily using CSS. Here's a portion of your HTML that I will clean up entirely: Before: <p align="center"><b>FRW Memories Chapter Three</b><br> <b><span style="font-size: 10.0pt; font-family: Verdana">John McCurdy 2005</span></b></td> </tr> <tr> <td height="16" align="justify"> <br> <b><font size="2">When the transfer of Paul Harris and Abie Hurst became known among the people of Alderson, an attempt was made to stop the transfers, A petition was circulated suggesting that the Town could ill-afford to lose such long-time residents. The Petition didn’t have a chance of changing the fate of the men. The Warden of the institution, Miss Nina Kinsella’s answer to the criticism was that those veteran officer’s skills were needed more at other prisons, and besides two young men from the area were being transferred into this prison to take their place!<br> And here's what it will look like using CSS: <td> <h1>FRW Memories Chapter Three</h1> <p>John McCurdy 2005</p> <p>When the transfer of Paul Harris and Abie Hurst became known among the people of Alderson, an attempt was made to stop the transfers, A petition was circulated suggesting that the Town could ill-afford to lose such long-time residents. The Petition didn’t have a chance of changing the fate of the men. The Warden of the institution, Miss Nina Kinsella’s answer to the criticism was that those veteran officer’s skills were needed more at other prisons, and besides two young men from the area were being transferred into this prison to take their place!<p> </td> You can see how much cleaner the HTML looks. Now you can define and control the styles seperately. CSS: h1 { text-align: center;} p { text-align: justify;} That's it! Of course there is a lot more that you can do with CSS but this is where you need to take the time to learn the basic of CSS so you can start implementing this kind of format to give you better results of designing your web pages. I will give you one more example: Based on the new code I given you above, you may ask: "But I want my name to be of different size and color from the other texts". This is what you add: <td> <h1>FRW Memories Chapter Three</h1> <p class="style-1">John McCurdy 2005</p> <p>When the transfer of Paul Harris and Abie Hurst became known among the people of Alderson, an attempt was made to stop the transfers, A petition was circulated suggesting that the Town could ill-afford to lose such long-time residents. The Petition didn’t have a chance of changing the fate of the men. The Warden of the institution, Miss Nina Kinsella’s answer to the criticism was that those veteran officer’s skills were needed more at other prisons, and besides two young men from the area were being transferred into this prison to take their place!<p> </td> You can see how much cleaner the HTML looks. Now you can define and control the styles seperately. CSS: h1 { text-align: center;} p { text-align: justify;} p.style-1 {font-size: 10px; color: #ff0000;} Hope this helps to motivate you to make the switch now. Also, you might want to looking to about Page Includes. It will make your life even easier.
_____________________________
I'm going to do it myself! Can you help me?? Link:The Kasper Group A Graphic and Web Design Company
|
|
|
|
Report Abuse |
Date: 11/20/2008 4:04:32 AM
 |
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|