Table displayed differently in web and print layouts

C

cberthiaume

Hello,

I have an html document consisting of a simple table. If I copy or
insert it into a word document it is rendered slightly differently than
I expect.

Specifically, if I have a cell with a fixed width (in the html) that
contains enough text to just fill the cell I get a cell with a single
line of text in the browser/"web layout" in word. I am specifying a
particular font and size in the html document.

However, in the "print layout", print preview, and actual printed
documents (from word or the browser, I get a cell with some text
wrapped onto a second line changing the height of the row.

An example HTML doc is included at the bottom of this message. Place it
into a new word document and switch from web layout to print layout to
see the difference.

Can someone explain why this happens? Is there a way to ensure that if
the text does't wrap in the browser/web layout then it won't wrap in
the print layout mode?

Thanks a lot.

<html>
<head>
<style>
..s1 {font-family: Arial;font-face: Arial;font-size: 12pt;width:6in}
..s2 {font-family: Arial;font-face: Arial;font-size: 12pt;width:4in}
..s3 {font-family: Arial;font-face: Arial;font-size: 12pt;width:2in}
</style>
</head>
<table class="s1">
<tr class="s1">
<td class="s2">
This is how much text it takes to make the line wrap in</td>
<td class="s3">some more text</td>
</tr>
</table>
</html>
 
A

Anne Troy

Your page likely has margins that result in a skinnier page width that your
monitor is set for resolution. Basically, set your table in Word to be 100%
width of the page. Then, when you save as HTML, I'm pretty sure it saves it
as 100% width of the (current user's monitor) screen. You'll see a big
difference. The table you created is 6 inches wide only.

************
Hope it helps!
Anne Troy
www.OfficeArticles.com
Check out the NEWsgroup stats!
Check out: www.ExcelUserConference.com
 
C

cberthiaume

Hi Anne,

Thanks for responding. I probably wasn't clear in my initial but the
table is supposed to have a fixed width. Basically, I am working with
an application that produces html tables with a specified width. I need
to insert these tables into a Word document.

The idea is to have the Word table look identical to the HTML table
(and, for that matter, have the print in general look identical to the
HTML). It may be that this just isn't possible in the manner I've been
attempting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top