使用CSS将网页与文字处理器匹配

时间:2013-02-08 03:34:53

标签: html css margins

我正在尝试将网页的尺寸,边距,文字大小,行高等与文字处理程序(在本例中为OpenOffice)进行匹配,以便在您打印网页或制作网页时它的PDF,看起来与文档完全一样。

到目前为止,我已将高度和宽度设置为11in / 8.5in,每边边距为0.79in,字体与文档大小相同。 (也就是说,如果文件使用pt。)

那么为什么它只占据了一半的页面?

此网站可以打印/ PDF格式,因此不必使用灵活的值。

谢谢!

这是一个示例文档的链接,我很快就会有一些代码 http://i.stack.imgur.com/l2Dl1.png

/*The rules go here*/
            #page-container {
                background: blue;
margin: 0.79in 0.79in 0.79in 0.79;
                width: 7.5in;
                height: 11in;
            }
            .name {
                font-size:22pt;
                font-weight:bold;
            }
            .sections {
                margin: 10px 0 0 0;
                font-weight:bold;
                text-decoration:underline;
                clear:right;
            }
            .jobtitles {
                font-weight:bold;
            }
            .leftside {
                float:left;
            }
            .rightside {
                float:right;
                width:50%;
            }
            .years {
                float: right;
                font-weight:bold;
                padding-right: 1%;
            }
            .desc {
                width: 760px;
            }
            ul {
                list-style-type: none;
                padding:0;
                margin:0;
            }
            #footer {
                text-align: center;
                font-weight: bold;
            }

蓝色的唯一原因是我能看到容器。

0 个答案:

没有答案