发票模板,标题<div>对齐问题

时间:2016-03-01 12:56:54

标签: css

我有这个模板,我们已经给予编辑,我想要它插入一个高度为25px和背景颜色的顶部标题div,我做了,但它根本无法正确对齐。我把它放在包装纸外面,增加了它的宽度,但它仍然略微对齐。

我在下面添加了原始模板 -

<head>
    <title>[DOCUMENT_TITLE]</title>
</head>
<body>
 <div id="pdfdoc">
  <div id="wrapper">
<div id="header">
    <div id="logo"><center><img src="[LOGOFILE]"></center></div>
    <div class="sender-address">
        <div class="sender-address-company">[SENDER_ADDRESS_COMPANY]</div>
        <div class="sender-address-line1">[SENDER_ADDRESS_LINE1]</div>
        <div class="sender-address-line2">[SENDER_ADDRESS_LINE2]</div>
        <div class="sender-address-line3">[SENDER_ADDRESS_LINE3]</div>
        <div class="sender-address-line4">[SENDER_ADDRESS_LINE4]</div>
        <div class="sender-address-postcode sender-address-line4">, </div>
        <div class="sender-address-postcode">[SENDER_ADDRESS_POSTCODE]</div>
    </div>
    <div id="header-info">
        <div id="vat-registration-info">[VATNUMINFO]</div>
        <div class="sender-address-phone">T: [SENDER_ADDRESS_PHONE]</div>
        <div class="sender-address-email">E: <a href="mailto:[SENDER_ADDRESS_EMAIL]">[SENDER_ADDRESS_EMAIL]</a></div>
    </div>
    <div class="cl" id="logo_clearer"></div>
</div>
</div>
</body>
</html>

CSS

html {width:793px;}
*,html,body{ font-family:[FONT]; color:[FONTCOLOR]; }
body { 
font-size:[FONTSIZE]px;
}

#wrapper {
margin:0  40px 0 40px;
}
#pdfdoc { 
font-size:1.1em /*increase font size for everthing from user-set body pt size       */
}
/* header */
#pdfdoc #header{ 
margin-top:2em;
border-bottom:1px solid #E5E5E5;
padding-bottom:24px;
margin-bottom:48px;
position:relative;
}

#logo{
float:left;
margin-right:24px;
margin-left:24px;
text-align:center;
vertical-align: middle; 
}

.sender-address {
font-size:1.1em;
float:left;
}
.sender-address-company{ font-weight:bold;font-size:1.1em;}
.sender-address-line4{ float:left;}
.sender-address-potcode{ float:left;}
#header-info{
float:right;
text-align:right;
position:absolute;
bottom:0; right:0;
margin-bottom:24px;
}
#header-info div{ color:#808080; }
#pdfdoc #header div a:link{ text-decoration:none; color:#808080;} 

如何在模板中集中对齐添加的Div?

http://jsfiddle.net/5RhFq/16/ - 在这里看起来不错,但在这里 - https://app.kashflow.com/v2/documents/invoice/89BAFB30-CF7C-4A14-98C3-37BD6D8C14CC?media=0&theme=396345它没有。

1 个答案:

答案 0 :(得分:0)

body { 
margin:70px auto;
font-size:[FONTSIZE]px;
}
相关问题