...

View Full Version : DOC to HTML



uglygreencouch
07-25-2007, 03:40 PM
First of all, hello! I am new here. It is very nice to meet all of you. :)

I am building a website for my place of employment and I've ran into a snag. I need this document (link (http://www.uglygreencouch.net/matrix_example.html))converted to html. (I had to delete the information from the 4th column because I don't want to get in trouble for posting private information on the internet but each number in the third column has a corresponding number in the fourth column and they need to line up with each other)

I have tried simply saving this word document with an html file extension but it does not preserve my fonts. It also causes the numbers to not line up like they need to. I have tried both the unfiltered and the filtered html options that word offers.

I have tried building these tables from scratch with html and they looked great in Firefox but the numbers refused to line up in IE. I need this document to look the same in IE and Firefox.

Would it be possible to build tables like this with CSS?

Thank you in advance for any help you can provide to me!

CFMaBiSmAd
07-25-2007, 03:58 PM
The Microsoft to HTML output produced by Word/Excel... is not cross browser friendly. I have seen some tools that strip some of the extra and unnecessary code, but I don't know how well they work, nor do I have any links I can give you.

Either search for a tool to help with this (unknown results), re-do the pages in straight HTML (or perhaps store the content in a database and produce the pages using a server side scripting language), or save the pages in PDF format to retain their formatting.

Edit: Since MS does not play nice, even within its' own applications, your HTML tables where you only had alignment problems with IE, would be your best bet. If you post that code, someone can probably help with fixing it. If you have a lot of these documents, they change over time, or new ones get created, I would recommend a more automated solution (database/server side language or the PDF method.)

garydarling
07-25-2007, 04:11 PM
It looks to me like you actually need tables, not a CSS solution. Your tabular data is what tables were designed to hold; I think that is your simplest solution.

uglygreencouch
07-25-2007, 06:19 PM
Thank you for your quick replies! Here is a link to the html tables I wrote from scratch. They look awesome in firefox but don't line up in IE. I'm just going to post it without removing the policy info this time and hope that it isn't considered giving out information. (link (http://www.uglygreencouch.net/matrixhtml.html))

Donkey
07-25-2007, 06:50 PM
I'm not an expert in tables but I think your problem is one of inconsistent widths. I would try not declaring a width for the table but declaring a with for each td and making sure that they are all the same in the same column.

Why don't you give each column a class eg td.1, td.2 etc then declare the width in the css.

Jutlander
07-25-2007, 07:19 PM
Thank you for your quick replies! Here is a link to the html tables I wrote from scratch. They look awesome in firefox but don't line up in IE. I'm just going to post it without removing the policy info this time and hope that it isn't considered giving out information. (link (http://www.uglygreencouch.net/matrixhtml.html))

For that I'd consider using a class which you style with CSS and place the content in. With what you have now, you get a lot of whitespace as you can see - try to get rid of that. Let me know if you want a demonstration of what I had in mind.

uglygreencouch
07-25-2007, 07:23 PM
I'm not an expert in tables but I think your problem is one of inconsistent widths. I would try not declaring a width for the table but declaring a with for each td and making sure that they are all the same in the same column.

Why don't you give each column a class eg td.1, td.2 etc then declare the width in the css.

That is a very good idea! I will mess around with that and see if it helps. Thank you :D

uglygreencouch
07-25-2007, 08:06 PM
For that I'd consider using a class which you style with CSS and place the content in. With what you have now, you get a lot of whitespace as you can see - try to get rid of that. Let me know if you want a demonstration of what I had in mind.

A demonstration would be lovely if you have one

Jutlander
07-25-2007, 08:44 PM
I composed this for you, but you can style it to suit your needs:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Something...</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
.box {
font-family: Arial, sans-serif;
border: 1px solid #555;
width: 500px;
margin: 10px;
}
h4 {
border-bottom: 1px solid #555;
padding: 5px;
}
h4.last {
border-top: 1px solid #555;
border-bottom: 0;
}
h3 {
padding: 10px;
}
p {
padding: 10px;
}
</style>
</head>

<body>

<div class="box">
<h4>EC.1.20</h4>
<h4>The critical access hospital maintains a safe environment</h4>
<h3>Rationale for EC 1.20</h3>
<p>It is essential that the critical access hospital conduct periodic environmental tours to determine if its current processes for managing patient, public, and staff safety risks are being practiced correctly and are effective. These tours can also be used to assess staff knowledge and behaviors, identify new or altered risks in areas where construction or changes in services have occurred, and identify opportunities to improve the environment.

1. The critical access hospital conducts environmental tours to identify environmental deficiencies, hazards, and unsafe practices.

2. The critical access hospital conducts environmental tours as least every six months in all areas where individuals are served.

3. The critical access hospital conducts environmental tours at least annually in areas where patients are not served.</p>
<h4 class="last">1, 2, and 3: Policy SAF 106; Scheduled tours by the Safety Committee; Weekly inspections</h4>
</div>

</body>
</html>

uglygreencouch
07-26-2007, 02:38 AM
VERY cool Jutlander! I will give it a go tomorrow at work and I'll let you all know how it goes. I am so glad I found this website! Most web site help places I've found are snooty and unhelpful. Quite untrue here! I hope I can help someone out on here some day. :thumbsup:

uglygreencouch
07-26-2007, 05:24 PM
I've played around with that code a bit and I've got one question--how do I create more columns? I can't seem to figure that part out. :confused:

Jutlander
07-26-2007, 05:29 PM
Those aren't columns. It isn't built up with tables, but with a div and then with styled <h3>, <h4> and <p> tags inside. You can add more <h4> tags and then you should get more, or post the code you have right now and i'll see what you mean.

uglygreencouch
07-26-2007, 06:12 PM
Those aren't columns. It isn't built up with tables, but with a div and then with styled <h3>, <h4> and <p> tags inside. You can add more <h4> tags and then you should get more, or post the code you have right now and i'll see what you mean.

I know they aren't columns, I'm saying that I'm going to need to make some. :) Is it possible to use this css in a way that will give me 4-5 columns? When I use <h4> it makes another cell but positions it beneath the one before it. I need it to be beside it.

uglygreencouch
07-27-2007, 02:30 PM
Hi all,

After poking around the internet and cussing a little (you always have to cuss a little ;)), I think I have figured something out. I just wanted to say thank you again for your help. I look forward to being a part of these forums!

I also wanted to post a link (http://www.captain.at/howto-css-style-table.php) that helped me in case anyone else ever has a problem like this. I found it to be very helpful. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum