Menu

referencing a CSS file in a notification

2014-12-16
2014-12-16
  • Gene Matthews

    Gene Matthews - 2014-12-16

    I've created a notification that currently has an embedded <style> tag defining the CSS. I want to move that out to a css file so I can share it across all notifications but I can't see to get it working.</p> <p>I'm assuming my location reference is off but I'm not sure what to change it to. I see that the iTop pages use "../css/cssFile.css" as the location. That is what I'm trying to use but I don't get any of my CSS applied in the generated notification email.</p> <p>My notification definition starts out like this:</p> <div class="codehilite"><pre><span></span><code><span class="cp">&lt;!DOCTYPE html&gt;</span> <span class="p">&lt;</span><span class="nt">head</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">&quot;stylesheet&quot;</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/css&quot;</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;../css/mycss.css&quot;</span> <span class="p">/&gt;</span> <span class="p">&lt;/</span><span class="nt">head</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">body</span><span class="p">&gt;</span> </code></pre></div> <p>The mycss.css file contains what I had been including in the <style> tag in the notification.</p> <p>I'm assuming the href specifying the css file location isn't correct?? I have the permissions and owner of that file set to the same as the css files delivered with iTop (apache:apache and 644).</p> <p>I'd be very grateful if someone can point me in the right direction.</p> <p>Thanks!</p> <p>Gene</p></style>

     
  • Gene Matthews

    Gene Matthews - 2014-12-16

    Denis,

    Thanks for the reference and the reply. I'll read that and use it to format my notifications.

    Gene

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.