Help - Search - Members - Calendar
Full Version: Print Preview
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Navy4571
Trying to keep text to the left of my article so I can place ads on the right of the screen, however, when I go to print it, it is all jacked up. I am fairly new to HTML. Not sure if im doing something wrong or if its supposed to look like that.

Here is the URL where the page is located:

http://www.scrantonpatravel.com/Travel-Ins...-insurance.html

Would appreciate a solution or an easier of doing this.

Thanks.
pandy
Hi! smile.gif

It's pretty jacked up in the browser too if you make the window smaller. You've made a very common newbie mistake. You try to format pretty lines with BR tags. You don't need to control where the lines should break for normal text. In fact, you shouldn't do that. The browser will wrap the lines for you, using the available width.

Remove the BR tags at the end of every line. Replace the double BR tags you've used to mimic paragraphs with real P tags (Paragraph).

Instead of this...

HTML
<BR>
<BR>
<p>Travel insurance is a type of insurance that is designed to cover many types of expenses that one might accrue or losses<BR> one might experience while traveling, whether within one’s own country or in a foreign one. It covers a wide breadth of<BR> different potential costs, and is used in countries around the world. In this article, we’ll take a look at some of the aspects<BR> of travel insurance that anyone considering getting it should know, such as what is typically covered and how much it <BR>typically costs. We’ll even go over a few exclusions that you’ll want to keep in mind, assuming that they apply to you.
<BR>
<BR>
There are several things that people commonly use travel insurance to cover – one of the primary ones are medical expenses, as many healthcare plans do not cover costs while in a foreign country, and many foreign countries will not accept health insurance from the traveler’s country of origin. Travel insurance will assure you that your potential medical expenses will be taken care of. Travel insurance also includes emergency evacuation, and in the event that some catastrophic event or political trouble ensues while you are in the country you will be guaranteed safe passage out of it. This is especially crucial in countries that experience frequent armed conflicts, or if you are traveling in a country currently at war.
<BR>
<BR>


you do it like so.

HTML
<p>
Travel insurance is a type of insurance that is designed to cover many types of expenses that one might accrue or losses one might experience while traveling, whether within one’s own country or in a foreign one. It covers a wide breadth of different potential costs, and is used in countries around the world. In this article, we’ll take a look at some of the aspects of travel insurance that anyone considering getting it should know, such as what is typically covered and how much it typically costs. We’ll even go over a few exclusions that you’ll want to keep in mind, assuming that they apply to you.</p>

<p>
There are several things that people commonly use travel insurance to cover – one of the primary ones are medical expenses, as many healthcare plans do not cover costs while in a foreign country, and many foreign countries will not accept health insurance from the traveler’s country of origin. Travel insurance will assure you that your potential medical expenses will be taken care of. Travel insurance also includes emergency evacuation, and in the event that some catastrophic event or political trouble ensues while you are in the country you will be guaranteed safe passage out of it. This is especially crucial in countries that experience frequent armed conflicts, or if you are traveling in a country currently at war.</p>


To get it "to the left" you need more than this though. You could use a two column table or (preferred) CSS.

You have a bigger problem. Browsers other than IE Windows will show the raw HTML. Try with for example FF to see it. This is because the page is served with the wrong content-type from the server, text/plain instead of text/html. If you use the .html extension you'll hopefully get the right content-type.
pandy
Wait, I think I get it now. You created the short lines to make room for a right column, right?

That's not the way to do it. Instead you put all the paragraphs in a container, it could be a DIV if you are going for CSS, otherwise a table cell. Then you limit the with of that container.

If you use tables, something like this. You have to fix appropriate widths yourself.

HTML
<table border="2" width="100%">
<tr>
<td>
CONTENT
</td>
<td width="200">
ADS
</td>
</tr>
</table>
Navy4571
Not too sound dumb, but can you assist me in creating a two column table using HTML. I never understood how to use them.

pandy
I did while you typed the above, I think. That is, I added a table to my post above. tongue.gif
Navy4571
QUOTE(pandy @ Mar 24 2009, 03:23 PM) *

I did while you typed the above, I think. That is, I added a table to my post above. tongue.gif



Thanks. I will give it a try. I knew there had to be an easier way. I heard of using tables like that but it just confused it. You made it simple. If you have any questions I will post them here.
Navy4571
Okay, looks like i finally got it. I will bookmark this so i can look back to it in the future.
Navy4571
Actually, Can you show me how to create a 3 column table?

Thanks.
pandy
No. But I'll tell you. tongue.gif

Each TR creates a row. For each TD you add you'll get a column. All rows must have the same number of TDs (that's not totally true, but let's pretend for now). You must always keep that structure. TABLE contains all the other table elements. TR contains the TDs (cells) for that row.

What I showed you was a 1 row 2 column table. What do you need to do to make it a 1 row 3 column table? smile.gif
Navy4571
QUOTE(pandy @ Mar 24 2009, 04:02 PM) *

No. But I'll tell you. tongue.gif

Each TR creates a row. For each TD you add you'll get a column. All rows must have the same number of TDs (that's not totally true, but let's pretend for now). You must always keep that structure. TABLE contains all the other table elements. TR ccontains the TDs (cells) of that row.

What I showed you was a 1 row 2 column table. What do you need to do to make it a 1 row 3 column table? smile.gif



Well, I would think that you need to add a TD and another TR. But I have no idea how its supposed to look lol
pandy
Only partly right. Think again. biggrin.gif
Darin McGrew
Add a TR only if you want another row. If you want another cell in the same row, then you add another TD to the row. The new TD comes before the </tr> tag that closes the TR.
Navy4571
I dont like this game lol....Um is this right?


<table border="2" width="100%">
<tr>
<td>
CONTENT
</td>
<td width="200">
ADS
</td>
<TD>
EVEN MORE CONTENT
</TD>
</tr>
</table>
geoffmerritt
Navy4571

That code will show 1 row with 3 colums... biggrin.gif

If you want another row, replicate whats between the <tr> </tr> tags and so on
Navy4571
yay, finally. Thanks for your help guys. Especially you Pandy!!
pandy
You're welcome. happy.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.