Drupal - 使用CSS主题节点类型

时间:2011-01-10 14:21:40

标签: html css drupal

嘿,我有一些内容我想保存为节点。问题是我试图保存的内容是html,即使将drupal设置为“完整HTML”输入格式,它仍然无法正确显示。

以下是我要发布的内容,删除了个人信息。

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<DIV style="position:relative;width:612;height:792;">
<STYLE type="text/css">
<!--
 .ft0{font-size:8px;font-family:Helvetica;color:#000000;}
 .ft1{font-size:4px;font-family:Helvetica;color:#000000;}
 .ft2{font-size:5px;font-family:Helvetica;color:#000000;}
 .ft3{font-size:10px;font-family:Helvetica;color:#000000;}
 .ft4{font-size:8px;line-height:12px;font-family:Helvetica;color:#000000;}
 .ft5{font-size:4px;line-height:7px;font-family:Helvetica;color:#000000;}
 .ft6{font-size:8px;line-height:2px;font-family:Helvetica;color:#000000;}
 .ft7{font-size:8px;line-height:3px;font-family:Helvetica;color:#000000;}
-->
</STYLE>
</HEAD>
<BODY bgcolor="#A0A0A0" vlink="blue" link="blue">
<DIV style="position:absolute;top:284;left:34"><nobr><span class="ft0">****</span></nobr></DIV>
<DIV style="position:absolute;top:284;left:160"><nobr><span class="ft0">MIC</span></nobr></DIV>
<DIV style="position:absolute;top:284;left:232"><nobr><span class="ft0">*********</span></nobr></DIV>
<DIV style="position:absolute;top:168;left:48"><nobr><span class="ft0">************</span></nobr></DIV>
<DIV style="position:absolute;top:284;left:437"><nobr><span class="ft0">**/**/2010</span></nobr></DIV>
<DIV style="position:absolute;top:181;left:48"><nobr><span class="ft4">****** St<br>******* 48602</span></nobr></DIV>
<DIV style="position:absolute;top:125;left:40"><nobr><span class="ft0">**********************</span></nobr></DIV>
<DIV style="position:absolute;top:54;left:60"><nobr><span class="ft0">*********</span></nobr></DIV>
<DIV style="position:absolute;top:54;left:317"><nobr><span class="ft0">1st*****</span></nobr></DIV>
<DIV style="position:absolute;top:84;left:431"><nobr><span class="ft0">**/**/2010</span></nobr></DIV>
<DIV style="position:absolute;top:84;left:520"><nobr><span class="ft0">      $00000</span></nobr></DIV>
<DIV style="position:absolute;top:298;left:30"><nobr><span class="ft1">EMPLOYEE NO.</span></nobr></DIV>
<DIV style="position:absolute;top:298;left:154"><nobr><span class="ft1">LOCATION</span></nobr></DIV>
<DIV style="position:absolute;top:298;left:233"><nobr><span class="ft1">EMPLOYEE  NAME</span></nobr></DIV>
<DIV style="position:absolute;top:298;left:445"><nobr><span class="ft1">PERIOD END</span></nobr></DIV>
<DIV style="position:absolute;top:311;left:151"><nobr><span class="ft1">HRS/UNITS</span></nobr></DIV>
<DIV style="position:absolute;top:311;left:199"><nobr><span class="ft1">CURRENT AMOUNT</span></nobr></DIV>
<DIV style="position:absolute;top:311;left:279"><nobr><span class="ft1">YEAR TO DATE</span></nobr></DIV>
<DIV style="position:absolute;top:310;left:372"><nobr><span class="ft2">DEDUCTIONS</span></nobr></DIV>
<DIV style="position:absolute;top:310;left:60"><nobr><span class="ft2">EARNINGS</span></nobr></DIV>
<DIV style="position:absolute;top:311;left:534"><nobr><span class="ft1">YEAR TO DATE</span></nobr></DIV>
<DIV style="position:absolute;top:311;left:459"><nobr><span class="ft1">CURRENT AMOUNT</span></nobr></DIV>
<DIV style="position:absolute;top:73;left:447"><nobr><span class="ft1">DATE</span></nobr></DIV>
<DIV style="position:absolute;top:73;left:521"><nobr><span class="ft1">AMOUNT</span></nobr></DIV>
<DIV style="position:absolute;top:169;left:19"><nobr><span class="ft5">TO THE<br>ORDER<br>OF</span></nobr></DIV>
<DIV style="position:absolute;top:125;left:19"><nobr><span class="ft2">PAY</span></nobr></DIV>
<DIV style="position:absolute;top:182;left:343"><nobr><span class="ft2">Bank Routing No.</span></nobr></DIV>
<DIV style="position:absolute;top:182;left:417"><nobr><span class="ft2">Bank Account Number</span></nobr></DIV>
<DIV style="position:absolute;top:181;left:515"><nobr><span class="ft2">Deposit Amount</span></nobr></DIV>
<DIV style="position:absolute;top:195;left:528"><nobr><span class="ft0">    99999</span></nobr></DIV>
<DIV style="position:absolute;top:195;left:418"><nobr><span class="ft0">9999-000</span></nobr></DIV>
<DIV style="position:absolute;top:195;left:336"><nobr><span class="ft0">9999999</span></nobr></DIV>
<DIV style="position:absolute;top:258;left:253"><nobr><span class="ft3"><b>NON NEGOTIABLE</b></span></nobr></DIV>
<DIV style="position:absolute;top:67;left:60"><nobr><span class="ft4">1212 N. *****<br>*****, MI 99999-</span></nobr></DIV>
<DIV style="position:absolute;top:9;left:4"><nobr><span class="ft6">.<br>.<br>.<br>.<br>.<br>.</span></nobr></DIV>
<DIV style="position:absolute;top:5;left:4"><nobr><span class="ft0">.</span></nobr></DIV>
<DIV style="position:absolute;top:27;left:4"><nobr><span class="ft0">.</span></nobr></DIV>
<DIV style="position:absolute;top:3;left:4"><nobr><span class="ft0">.</span></nobr></DIV>
<DIV style="position:absolute;top:29;left:4"><nobr><span class="ft0">.</span></nobr></DIV>
<DIV style="position:absolute;top:284;left:103"><nobr><span class="ft0">01</span></nobr></DIV>
<DIV style="position:absolute;top:298;left:102"><nobr><span class="ft1">SHIFT</span></nobr></DIV>
<DIV style="position:absolute;top:324;left:25"><nobr><span class="ft0">Regular Pay</span></nobr></DIV>
<DIV style="position:absolute;top:324;left:348"><nobr><span class="ft0">Federal Income</span></nobr></DIV>
<DIV style="position:absolute;top:324;left:153"><nobr><span class="ft0">  7999</span></nobr></DIV>
<DIV style="position:absolute;top:324;left:210"><nobr><span class="ft0">     9999</span></nobr></DIV>
<DIV style="position:absolute;top:324;left:281"><nobr><span class="ft0">     9999</span></nobr></DIV>
<DIV style="position:absolute;top:324;left:471"><nobr><span class="ft0">      9999</span></nobr></DIV>
<DIV style="position:absolute;top:324;left:540"><nobr><span class="ft0">     9999</span></nobr></DIV>
<DIV style="position:absolute;top:338;left:25"><nobr><span class="ft0">Overtime Pay</span></nobr></DIV>
<DIV style="position:absolute;top:338;left:348"><nobr><span class="ft0">Medicare Tax</span></nobr></DIV>
<DIV style="position:absolute;top:338;left:156"><nobr><span class="ft0">   0.000</span></nobr></DIV>
<DIV style="position:absolute;top:338;left:217"><nobr><span class="ft0">        0.00</span></nobr></DIV>
<DIV style="position:absolute;top:338;left:283"><nobr><span class="ft0">      9999</span></nobr></DIV>
<DIV style="position:absolute;top:338;left:474"><nobr><span class="ft0">       9999</span></nobr></DIV>
<DIV style="position:absolute;top:338;left:543"><nobr><span class="ft0">      9999</span></nobr></DIV>
<DIV style="position:absolute;top:353;left:25"><nobr><span class="ft0">Vacation Pay</span></nobr></DIV>
<DIV style="position:absolute;top:353;left:348"><nobr><span class="ft0">FICA Tax</span></nobr></DIV>
<DIV style="position:absolute;top:353;left:156"><nobr><span class="ft0">   9999</span></nobr></DIV>
<DIV style="position:absolute;top:353;left:212"><nobr><span class="ft0">      9999</span></nobr></DIV>
<DIV style="position:absolute;top:353;left:283"><nobr><span class="ft0">      9999</span></nobr></DIV>
<DIV style="position:absolute;top:353;left:474"><nobr><span class="ft0">       9999</span></nobr></DIV>
<DIV style="position:absolute;top:353;left:540"><nobr><span class="ft0">     9999</span></nobr></DIV>
<DIV style="position:absolute;top:367;left:348"><nobr><span class="ft0">Michigan Income</span></nobr></DIV>
<DIV style="position:absolute;top:367;left:474"><nobr><span class="ft0">       9999</span></nobr></DIV>
<DIV style="position:absolute;top:367;left:540"><nobr><span class="ft0">     99999</span></nobr></DIV>
<DIV style="position:absolute;top:381;left:348"><nobr><span class="ft0">Saginaw Residen</span></nobr></DIV>
<DIV style="position:absolute;top:381;left:474"><nobr><span class="ft0">       999</span></nobr></DIV>
<DIV style="position:absolute;top:381;left:543"><nobr><span class="ft0">      57999</span></nobr></DIV>
<DIV style="position:absolute;top:395;left:348"><nobr><span class="ft0">Hth Ins. Co-Pay</span></nobr></DIV>
<DIV style="position:absolute;top:395;left:471"><nobr><span class="ft0">      11999</span></nobr></DIV>
<DIV style="position:absolute;top:395;left:540"><nobr><span class="ft0">     29999</span></nobr></DIV>
<DIV style="position:absolute;top:409;left:348"><nobr><span class="ft0">Dental Co-Pay</span></nobr></DIV>
<DIV style="position:absolute;top:409;left:474"><nobr><span class="ft0">       19999</span></nobr></DIV>
<DIV style="position:absolute;top:409;left:543"><nobr><span class="ft0">     999999</span></nobr></DIV>
<DIV style="position:absolute;top:423;left:348"><nobr><span class="ft0">Vision Co-Pay</span></nobr></DIV>
<DIV style="position:absolute;top:423;left:476"><nobr><span class="ft0">       999</span></nobr></DIV>
<DIV style="position:absolute;top:423;left:543"><nobr><span class="ft0">      19999</span></nobr></DIV>
<DIV style="position:absolute;top:668;left:116"><nobr><span class="ft0">      169999</span></nobr></DIV>
<DIV style="position:absolute;top:668;left:287"><nobr><span class="ft0">      19999</span></nobr></DIV>
<DIV style="position:absolute;top:668;left:202"><nobr><span class="ft0">       999999</span></nobr></DIV>
<DIV style="position:absolute;top:668;left:370"><nobr><span class="ft0">     999999</span></nobr></DIV>
<DIV style="position:absolute;top:668;left:456"><nobr><span class="ft0">     999999</span></nobr></DIV>
<DIV style="position:absolute;top:668;left:534"><nobr><span class="ft0">     999999</span></nobr></DIV>
<DIV style="position:absolute;top:681;left:102"><nobr><span class="ft1">CURRENT EARNINGS</span></nobr></DIV>
<DIV style="position:absolute;top:681;left:184"><nobr><span class="ft1">CURRENT DEDUCTIONS</span></nobr></DIV>
<DIV style="position:absolute;top:679;left:288"><nobr><span class="ft2">NET PAY</span></nobr></DIV>
<DIV style="position:absolute;top:681;left:365"><nobr><span class="ft1">Y.T.D. EARNINGS</span></nobr></DIV>
<DIV style="position:absolute;top:681;left:446"><nobr><span class="ft1">Y.T.D. DEDUCTIONS</span></nobr></DIV>
<DIV style="position:absolute;top:681;left:532"><nobr><span class="ft1">Y.T.D. NET PAY</span></nobr></DIV>
</DIV>

它应该看起来像一个paystub,所有内容都正确对齐,文本有点小,但很容易修复,但我无法弄清楚为什么在保存节点后一切都只是左对齐。我尝试了所有三种输入格式都没有给我我想要的东西。有任何想法吗?

我很新

Drupal的这个安装仅在我们的内联网上,属于付费存根和所有那些我确信有人愿意亲自动手的好的个人信息。所以我无法给你任何东西的实时链接。

我可以告诉你它只是Drupal的一个默认安装,所以我可以相当确定没有任何不可思议的事情发生在幕后。我尝试从HTML中删除头部和身体标签无济于事。

保存后启用“完整HTML”输入模式时,字体大小调整正常,背景颜色更改为灰色,这是我发布的HTML代码,因此这些部分正常工作。似乎缺少的是文本的定位。

这是截图。 http://i.stack.imgur.com/4gsuW.png

1 个答案:

答案 0 :(得分:0)

你有几个问题。很难说哪个可能导致赦免定位失败,但这里有一些事情需要解决:

  1. 您不需要元标记。 Drupal的 已经做到了(2,实际上)。
  2. 您不应该添加<style>标记 你的标记。使用 CSS模块用于特定于节点的CSS。
  3. 您不能拥有<body>标签 你的节点。节点存在于 <body>,所以这给你一个 <体的结构> div>身体&gt; DIV。我怀疑这是根源 你的问题。
  4. 你应该使用 white-space 在CSS而不是<nobr>
  5. 停止大写标签。它没有 打破任何东西,但让你看起来 就像一个疯狂的人一样尖叫 时间。
  6. 如果所有这些都无法解决您的问题,请安装Firebug以查看您的样式属性是否正在应用和/或是否有其他内容覆盖它。