Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14

Thread: DOC to HTML

  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DOC to HTML

    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)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!

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,146
    Thanks
    2
    Thanked 333 Times in 325 Posts
    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.)
    Last edited by CFMaBiSmAd; 07-25-2007 at 05:19 PM. Reason: Additional
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Location
    Seattle
    Posts
    153
    Thanks
    5
    Thanked 9 Times in 9 Posts
    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.

  • #4
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)

  • #5
    Regular Coder Donkey's Avatar
    Join Date
    Sep 2003
    Location
    Blackfield UK
    Posts
    312
    Thanks
    1
    Thanked 36 Times in 36 Posts
    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.
    " 90% of everything is crud" - Theodore Sturgeon
    Filthy Beast - a 60's Rock Band

  • #6
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Quote Originally Posted by uglygreencouch View Post
    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)
    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.
    .
    .

  • #7
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Donkey View Post
    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

  • #8
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Jutlander View Post
    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

  • #9
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    I composed this for you, but you can style it to suit your needs:

    Code:
    <!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>
    .
    .

  • #10
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #11
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #12
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    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.
    .
    .

  • #13
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Jutlander View Post
    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.

  • #14
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 that helped me in case anyone else ever has a problem like this. I found it to be very helpful.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •