开发者

Easy way to apply calculated/inline styles to html?

Really annoying situation, and maybe there is an easier solution.. but I basically have a simple table I have styled in the general 开发者_如何学Pythonformat:

<style type="text/css">
  table.master_table {
    ... global table styling
  }
  .master_table td {
    ... master table td styling
  } 
  .master_table td.dv {
    ... td dv style
  }
  .. more styling
</style>

<table class="master_table">
  <tbody>
 <tr>
   <td class="dv">
     .. nothing special
 </tr>
  </tbody>
</table>

Now the problem is the server doesn't support the "style" element so I need to manually apply the style to each level i.e.:

<table style="... global table styling">
  <tbody>
 <tr>
   <td style="td styling;td dv style">
     .. nothing special
 </tr>
  </tbody>
</table>

Is there any programs that can do this? Or is there any easier way to do this? I basically have a Wordpress.com blog that looks beautiful, in Live Writer because of some custom styling but as soon as I post, it strips out the style block. As a test I went through an manually did some of the above and it works, its just insanely painful and error prone.


if you are on wordpress.com i do not think you can control the css or anyother file.

you have to host your own wordpress.org blog to customize your theme.


So I found an online solution called "emogrifier"

Works well, all you have to do is enter css, then enter html and it will output inline styles.


There is a plugin called Art Direction which lets you add custom css on a per post basis. If you use this style on several different pages you should add the styles to a global stylesheet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜