<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Image in Module Header?]]></title><description><![CDATA[<p dir="auto">Can you put an image in a module header?</p>
<p dir="auto">I’ve been currently trying to use an iFrame above the module I want the image as a header and trying to reduce the gaps, but not that successful with that.</p>
]]></description><link>https://forum.magicmirror.builders/topic/2718/image-in-module-header</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 04:24:49 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/2718.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Jun 2017 07:11:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Image in Module Header? on Sun, 09 Jul 2017 21:37:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mykle1" aria-label="Profile: Mykle1">@<bdi>Mykle1</bdi></a> said in <a href="/post/25072">Image in Module Header?</a>:</p>
<blockquote>
<p dir="auto">I don’t know if it can be done using css</p>
</blockquote>
<p dir="auto">Well now I know. Thanks @j-e-f-f</p>
<p dir="auto">That information would have been really useful <strong>2 days ago!</strong> hahaha</p>
]]></description><link>https://forum.magicmirror.builders/post/25136</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/25136</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Sun, 09 Jul 2017 21:37:51 GMT</pubDate></item><item><title><![CDATA[Reply to Image in Module Header? on Sun, 09 Jul 2017 13:59:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joela85" aria-label="Profile: joela85">@<bdi>joela85</bdi></a> It is possible.  You can use the <code>:before</code> or <code>:after</code> CSS pseudo-elements</p>
<p dir="auto">Here’s an example:</p>
<pre><code>.MMM-SomeModule header:before {
  content: url('path/to/your/image.png');
}
</code></pre>
<p dir="auto">By default, <code>:before</code> will put the image at the start of the header text, <code>:after</code> will put it at the end.  But like anything, you can position things however you desire.</p>
<p dir="auto">For example, this rule will size the image to 16px X 16px, and position it at the top and 30px from the right edge of the header element.</p>
<pre><code>.MMM-SomeModule header {
  position: relative;  /* any absolutely positioned children will be relative to this element */
}

.MMM-SomeModule header:before {
  content: url('path/to/your/image.png');
  display: block;
  width: 16px;
  height: 16px;

  /*
    These rules allow you to position the image anywhere you want in the header
  */
  position: absolute;
  right: 30px;
  top: 0px;
}</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/25114</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/25114</guid><dc:creator><![CDATA[j.e.f.f]]></dc:creator><pubDate>Sun, 09 Jul 2017 13:59:39 GMT</pubDate></item><item><title><![CDATA[Reply to Image in Module Header? on Sun, 09 Jul 2017 07:27:06 GMT]]></title><description><![CDATA[<p dir="auto">Ah cool, thanks. I’ll have a look at that when I get home. Looks good.</p>
]]></description><link>https://forum.magicmirror.builders/post/25101</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/25101</guid><dc:creator><![CDATA[joela85]]></dc:creator><pubDate>Sun, 09 Jul 2017 07:27:06 GMT</pubDate></item><item><title><![CDATA[Reply to Image in Module Header? on Sat, 08 Jul 2017 00:38:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joela85" aria-label="Profile: joela85">@<bdi>joela85</bdi></a></p>
<blockquote>
<p dir="auto">Can you put an image in a module header?</p>
</blockquote>
<p dir="auto">I don’t know if it can be done using css but a module certainly can be coded to have an image in the header.</p>
<p dir="auto">I had meant to do this sooner but I was working on something else.  I stripped down my MMM-EyeCandy module (it’s still available) and made this for you or anyone that might want to use it.</p>
<p dir="auto">Basically, you disable the standard header on a module and use this instead. Just install it and make your entry in the config above the module you want to use it with. The css file provided allows you to size and position the ImageHeader any way and anywhere you like.</p>
<p dir="auto"><a href="https://github.com/mykle1/MMM-ImageHeader" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mykle1/MMM-ImageHeader</a></p>
]]></description><link>https://forum.magicmirror.builders/post/25072</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/25072</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Sat, 08 Jul 2017 00:38:36 GMT</pubDate></item></channel></rss>