Forum Moderators: open

Message Too Old, No Replies

help needed with applying new styles to uploaded ms-word .htm pages

applying new style to word .htm pages after uploading

         

max_jessop

11:10 am on Oct 2, 2008 (gmt 0)

10+ Year Member



hello.

BACKGROUND INFO:
I have built a site for the restaurant I work at. The head chef wishes to upload the ever changing menu to the site.

So he types up the menu in word then saves as a web page.

Then logs on to the site and via a PHP uploads the .htm file to the server.

The folder containing the filelist.xml and header.htm are already on the server.

The site uses Iframe to display the menu, calling it from the sever.

WHAT I NEED TO DO:
The menu as a word doc must have a white background for printing but the site uses a colour background and I am hoping it is possible to force the menu.htm file to use a different bgcolor.

I thought that this might be possible via the filelist.xml file that never changes. ?possibly reverencing an alternative css?

I have no experience with .xml and only a basic understanding of html. I used GoLive to create the site.

thanks for reading this.

Marshall

12:58 pm on Oct 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My suggestion, and it is only a suggestion, is though the chef types the menu in word, have him save it as a text file that way you will not have any of the bloated code MS inserts which can interfere with you CSS. Then, just "include" the text file in an html template with a simple include script.

Marshall

max_jessop

1:22 pm on Oct 2, 2008 (gmt 0)

10+ Year Member



Thanks Marshall,

Good Suggestion and I didn't think of it.

I found that if I added the BGCOLOR code to the <body> in the .htm file after saving then re-opened it in word it left it in the file, so its a messy work around but it works.

Your suggestion is much better but the menu needs columns (food description - price), which when saved as .txt moves column 2 to a new page.

Thanks again for helping and any ideas on how to keep the columns would be good as I will then be able to use a .css to make it look better on the site.

thanks

Marshall

2:13 pm on Oct 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My only thought on the two column issue is two includes side by side: one for the menu, one for the prices. This could be achieved with two <div> or a two column table. The only problem I see with it, though, is making sure the prices line up with the items.

I have a customer, which too is a restaurant, and the site has a menu. I use a two column table, left for items, right for prices, and have the bottom border of the <td> dotted. Visually it works great and emulates the .pdf version (which is another option - save the .doc as a .pdf), but I hand code the page and their menu does not change that often.

Marshall

max_jessop

2:41 pm on Oct 2, 2008 (gmt 0)

10+ Year Member



Thanks again.

Think I'll spend some time learning ms'word and see what I can get away with. The chef ain't all that confident with computers so keeping it simple is a big part of it.

Appreciate all your comments
Max

g1smd

7:06 pm on Oct 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have a simple system where the user has a template which they edit in a text editor.

The template calls includes at top and bottom for header and navigation, and the user doesn't touch those lines of code.

The user just edits the content area, and has to wrap the content in bare heading and paragraph tags.

All of the styling is done by an external CSS file.

max_jessop

12:51 pm on Oct 17, 2008 (gmt 0)

10+ Year Member



Thanks again everyone for your help. The DIV suggestion was a a winner.

Now I'm thinking of another way I'd like to achieve all this. I thought it would be easy to find the answers by searching google, but after two days of fiddling about with INCLUDE LINK ID CLASS and so many other things I'm lost and confused.

I thought if I build a duplicate table(div) on a new html page I could load the corresponding text from the menu page into each cell. the benefit being I can format this page the way I want with a stylesheet css.

So in short is there a way of loading the text from a cell on an external page into the cell of the page I want shown.

I know that probably isn't very clear

Thanks, if you do have any thought on this I'd be grateful

g1smd

5:07 pm on Oct 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes. This
<?php  include ('/somefolder/thatfile.php'); ?>
drops the content from that file into the current page at the exact point the "include" instruction is included.

max_jessop

1:24 pm on Oct 20, 2008 (gmt 0)

10+ Year Member



Thanks g1smd,
Is there a way of including only part of the 'thatfile.php'?

g1smd

4:00 pm on Oct 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That file would only be a small piece of code, some paragraphs etc. It would not have head or body tags, no title element, no meta tags, nothing other than content.

If you were wanting to extract part of a page, then you would need a PHP script or something, but I don't see any need for that complexity.

max_jessop

12:02 pm on Oct 21, 2008 (gmt 0)

10+ Year Member



Its a pain but the original file I want to extract the text from will be a msWord document. It can be saved as a web .htm page but not .txt as it uses tables. msWord saves somuch rubbish in the .htm page it is imposible? to use the page, as is, on the website.

g1smd

12:07 pm on Oct 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Not impossible, as long as you can uniquely identify the "start" point and the "stop" point.

You would then use a PHP script and regex to grab just that section of the document.

max_jessop

12:44 pm on Oct 21, 2008 (gmt 0)

10+ Year Member



thanks, know any sites with examples of how to use?