<?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" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[HTML - All your code are belong to us]]></title><description><![CDATA[Thoughts, stories and ideas on code and technology in general.<br>Blog title inspired by <a href="https://en.wikipedia.org/wiki/All_your_base_are_belong_to_us" target="_blank">this meme</a>]]></description><link>https://allurcode.com/</link><image><url>https://allurcode.com/favicon.png</url><title>HTML - All your code are belong to us</title><link>https://allurcode.com/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Tue, 30 Sep 2025 11:27:41 GMT</lastBuildDate><atom:link href="https://allurcode.com/tag/html/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[CSS Triangle]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Really simple triangles working in all major browsers, including IE6+.</p>
<h3 id="html">HTML</h3>
<p>No surprises here. Our HTML is as simple as that.</p>
<pre><code class="language-html">&lt;div class=&quot;arrow_top&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;arrow_right&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;arrow_bottom&quot;</code></pre>]]></description><link>https://allurcode.com/css-triangle/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea141</guid><category><![CDATA[CSS]]></category><category><![CDATA[HTML]]></category><category><![CDATA[triangle]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Mon, 31 Oct 2011 21:58:17 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Really simple triangles working in all major browsers, including IE6+.</p>
<h3 id="html">HTML</h3>
<p>No surprises here. Our HTML is as simple as that.</p>
<pre><code class="language-html">&lt;div class=&quot;arrow_top&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;arrow_right&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;arrow_bottom&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;arrow_right&quot;&gt;&lt;/div&gt;
</code></pre>
<h3 id="css">CSS</h3>
<p>The trick is to create an element with zero width and height. The actual size will be determined by the element&#x2019;s borders. For example, up arrow has top and bottom borders set as transparent and the left border with a solid colour. Imagine it as drawing an arrow where its pointing corner is our zero dimensions div element.</p>
<h2 id="examples">Examples</h2>
<style>
.arrow_top {
	width:0;
	height:0;
	border-left:30px solid transparent;
	border-right:30px solid transparent;
	border-bottom:30px solid #ff9600;
	margin-bottom:10px;
}
.arrow_right {
	width:0;
	height:0;
	border-top:30px solid transparent;
	border-bottom:30px solid transparent;
	border-left:30px solid #ff9600;
	margin-bottom:10px;
}
.arrow_bottom {
	width:0;
	height:0;
	border-left:30px solid transparent;
	border-right:30px solid transparent;
	border-top:30px solid #ff9600;
	margin-bottom:10px;
}
.arrow_left {
	width:0;
	height:0;
	border-top:30px solid transparent;
	border-bottom:30px solid transparent;
	border-right:30px solid #ff9600;
	margin-bottom:10px;
}
.arrow_top_filled {
	width:5px;
	height:5px;
	border-left:30px solid #222;
	border-right:30px solid #222;
	border-bottom:30px solid #ff9600;
	margin-bottom:10px;
}
.arrow_top_right {
	width:0;
	height:0;
	border-bottom:30px solid transparent;
	border-left:30px solid transparent;
	border-right:30px solid #ff9600;
	margin-bottom:10px;
}
</style>
<h3 id="arrowtop">Arrow top</h3>
<div class="arrow_top"></div>
<pre><code class="language-css">.arrow_top {
  width:0;
  height:0;
  border-top:30px solid transparent;
  border-bottom:30px solid transparent;
  border-left:30px solid #ff9600;
}
</code></pre>
<h3 id="arrowright">Arrow right</h3>
<div class="arrow_right"></div>
<pre><code class="language-css">.arrow_right {
  width:0;
  height:0;
  border-top:30px solid transparent;
  border-bottom:30px solid transparent;
  border-left:30px solid #ff9600;
  margin-bottom:10px;
}
</code></pre>
<h3 id="arrowbottom">Arrow bottom</h3>
<div class="arrow_bottom"></div>
<pre><code class="language-css">.arrow_bottom {
  width:0;
  height:0;
  border-left:30px solid transparent;
  border-right:30px solid transparent;
  border-top:30px solid #ff9600;
  margin-bottom:10px;
}
</code></pre>
<h3 id="arrowleft">Arrow left</h3>
<div class="arrow_left"></div>
<pre><code class="language-css">.arrow_left {
  width:0;
  height:0;
  border-top:30px solid transparent;
  border-bottom:30px solid transparent;
  border-right:30px solid #ff9600;
  margin-bottom:10px;
}
</code></pre>
<h3 id="arrowtopwithnontransparentbordersandpointingcornerisa5px5pxdiv">Arrow top with non transparent borders and pointing corner is a 5px / 5px div</h3>
<div class="arrow_top_filled"></div>
<pre><code class="language-css">.arrow_top_filled {
  width:5px;
  height:5px;
  border-left:30px solid #222;
  border-right:30px solid #222;
  border-bottom:30px solid #ff9600;
  margin-bottom:10px;
}
</code></pre>
<h3 id="arrowtopright">Arrow top right</h3>
<div class="arrow_top_right"></div>
<pre><code class="language-css">.arrow_top_right {
  width:0;
  height:0;
  border-bottom:30px solid transparent;
  border-left:30px solid transparent;
  border-right:30px solid #ff9600;
  margin-bottom:10px;
}
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Hot off the workshop vol. 2]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><img src="https://allurcode.com/content/images/2011/03/tkmaxx_rebrand.jpg" alt="TK Maxx website rebranding" title="TK Maxx website rebranding" loading="lazy"></p>
<p>Website redesign for TK Maxx. Launched just yesterday.<br>
Venda coding all the way in the back end and HTML, JavaScript and CSS in the front end.<br>
<a href="https://www.tkmaxx.com/">Visit live site</a></p>
<h3 id="whativelearnt">What I&#x2019;ve learnt</h3>
<p>The biggest challenge was to make the site work in Internet Explorer 6 and 7. One</p>]]></description><link>https://allurcode.com/hot-off-the-workshop-vol-2/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea138</guid><category><![CDATA[CSS]]></category><category><![CDATA[HTML]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[TK Maxx]]></category><category><![CDATA[Venda]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Tue, 22 Mar 2011 22:45:50 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p><img src="https://allurcode.com/content/images/2011/03/tkmaxx_rebrand.jpg" alt="TK Maxx website rebranding" title="TK Maxx website rebranding" loading="lazy"></p>
<p>Website redesign for TK Maxx. Launched just yesterday.<br>
Venda coding all the way in the back end and HTML, JavaScript and CSS in the front end.<br>
<a href="https://www.tkmaxx.com/">Visit live site</a></p>
<h3 id="whativelearnt">What I&#x2019;ve learnt</h3>
<p>The biggest challenge was to make the site work in Internet Explorer 6 and 7. One particularly annoying issue was to make the logo stay on top of the sliding main homepage image. All other browsers were fine, but in IE6 and 7 the logo was hidden behind the image.</p>
<div style="float:left; width:50%; text-align:center;">
    <img src="https://allurcode.com/content/images/2011/03/tkmaxx_rebrand_1.jpg" alt="Before" title="TK Maxx website rebranding, logo bug">
    <em>Logo behind the image</em>
</div>
<div style="float:left; width:50%; text-align:center;">
    <img src="https://allurcode.com/content/images/2011/03/tkmaxx_rebrand_2.jpg" alt="After" title="TK Maxx website rebranding, logo bug">
    <em>Logo on top of the image</em>
</div>
<p>The trick was simple yet not obvious. <code>&lt;div&gt;</code> containing the logo needs not only its z-index set to a higher value than sliding image, but also we have to make sure IE treats it seriously and make our CSS rule important.</p>
<pre><code class="language-css">#logo { z-index: 1000; }
</code></pre>
<p>Above will not work whereas below will work like a charm.</p>
<pre><code class="language-css">#logo { z-index: 1000 !important; }
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Hot off the workshop vol. 1]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Just launched. TK Maxx and Red Nose Day campaign applications.</p>
<h3 id="facebookquiz">Facebook quiz</h3>
<p><a href="https://apps.facebook.com/red_nose_tshirt/"><img src="https://allurcode.com/content/images/2011/02/portfolio_1_1.jpg" alt loading="lazy"></a></p>
<p>Fun quiz to find out your perfect Red Nose Day t-shirt.<br>
<a href="https://apps.facebook.com/red_nose_tshirt/">View site</a></p>
<h3 id="websiteapplication">Website application</h3>
<p><a href="https://apps.facebook.com/red_nose_tshirt/"><img src="https://allurcode.com/content/images/2011/02/portfolio_1_2.jpg" alt loading="lazy"></a></p>
<p>Upload you photo with Flash uploader, resize it and pan it around with JavaScript then save your results with PHP.<br>
<a href="https://apps.facebook.com/red_nose_tshirt/">View site</a></p>
<!--kg-card-end: markdown-->]]></description><link>https://allurcode.com/hot-off-the-workshop-vol-1/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea132</guid><category><![CDATA[CSS]]></category><category><![CDATA[Facebook]]></category><category><![CDATA[HTML]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[MySQL]]></category><category><![CDATA[PHP]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Wed, 23 Feb 2011 11:51:53 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Just launched. TK Maxx and Red Nose Day campaign applications.</p>
<h3 id="facebookquiz">Facebook quiz</h3>
<p><a href="https://apps.facebook.com/red_nose_tshirt/"><img src="https://allurcode.com/content/images/2011/02/portfolio_1_1.jpg" alt loading="lazy"></a></p>
<p>Fun quiz to find out your perfect Red Nose Day t-shirt.<br>
<a href="https://apps.facebook.com/red_nose_tshirt/">View site</a></p>
<h3 id="websiteapplication">Website application</h3>
<p><a href="https://apps.facebook.com/red_nose_tshirt/"><img src="https://allurcode.com/content/images/2011/02/portfolio_1_2.jpg" alt loading="lazy"></a></p>
<p>Upload you photo with Flash uploader, resize it and pan it around with JavaScript then save your results with PHP.<br>
<a href="https://apps.facebook.com/red_nose_tshirt/">View site</a></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[HTML5 Where to start?]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Everyone is excited about the new kid on the block &#x2013; HTML5, but where to start and how to use it? There are couple of things you can start using right now with a few hacks for our lovely IE6 and other browsers not yet supporting HTML5. Before we get</p>]]></description><link>https://allurcode.com/html5-where-to-start/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea125</guid><category><![CDATA[HTML]]></category><category><![CDATA[html5]]></category><category><![CDATA[markup]]></category><category><![CDATA[semantic]]></category><category><![CDATA[start]]></category><category><![CDATA[tag]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Tue, 15 Jun 2010 14:16:55 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Everyone is excited about the new kid on the block &#x2013; HTML5, but where to start and how to use it? There are couple of things you can start using right now with a few hacks for our lovely IE6 and other browsers not yet supporting HTML5. Before we get into it, it&#x2019;s good to know the level of support of HTML5 in different browsers. These few links can help you find it out.</p>
<ul>
<li><a href="https://html5test.com/">Test your browser for support</a></li>
<li><a href="https://bestvpn.org/whats-my-ip/">Web Designer&#x2019;s Checklist</a></li>
<li><a href="https://caniuse.com/">When can I use</a></li>
</ul>
<h3 id="notsupportedelements">Not supported elements</h3>
<p>Following elements are no longer supported in HTML5:</p>
<pre><code class="language-html">&lt;acronym&gt;
&lt;applet&gt;
&lt;basefont&gt;
&lt;big&gt;
&lt;center&gt;
&lt;dir&gt;
&lt;font&gt;
&lt;frame&gt;
&lt;frameset&gt;
&lt;noframes&gt;
&lt;s&gt;
&lt;strike&gt;
&lt;tt&gt;
&lt;u&gt;
&lt;xmp&gt;
</code></pre>
<p>Now, lets start with a few simple tags.</p>
<h3 id="doctype">Doctype</h3>
<p>Oh the doctype, who could remember the whole thing?</p>
<pre><code class="language-html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot; &gt;
</code></pre>
<p>Instead of old doctype like the one above, we can finally start using something that is really easy to remember.</p>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
</code></pre>
<p>YES! That&#x2019;s it, we&#x2019;re done &#x1F642; Even Google is using it already.</p>
<h3 id="characterset">Character Set</h3>
<p>Again, a lot simpler than it used to be.</p>
<pre><code class="language-html">&lt;meta charset=&quot;utf-8&quot; /&gt;
</code></pre>
<h3 id="scriptstyleandlinkelements"><code>&lt;script&gt;</code>, <code>&lt;style&gt;</code> and <code>&lt;link&gt;</code> elements</h3>
<p>We&#x2019;re all used to this</p>
<pre><code class="language-html">&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/my/file.js&quot;&gt;&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
  #myId {
    margin:0px;
  }
&lt;/style&gt;
&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/path/to/my/file.css&quot; /&gt;
</code></pre>
<p>but with HTML5 the we can omit the <code>type</code> attributes as the values like above are set as default. Our bit of code becomes a little more clean.</p>
<pre><code class="language-html">&lt;script src=&quot;/path/to/my/file.js&quot;&gt;&lt;/script&gt;
&lt;style&gt;
  #myId {
    margin:0px;
  }
&lt;/style&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;/path/to/my/file.css&quot; /&gt;
</code></pre>
<h3 id="semanticstructure">Semantic structure</h3>
<p>A few new elements were added to add a more semantic meaning to well known <div> tag. Some of those elements are:</div></p>
<pre><code class="language-html">&lt;article&gt;
&lt;section&gt;
&lt;aside&gt;
&lt;hgroup&gt;
&lt;header&gt;
&lt;footer&gt;
&lt;nav&gt;
&lt;time&gt;
&lt;mark&gt;
&lt;figure&gt;
&lt;figcaption&gt;
</code></pre>
<h3 id="supportinie">Support in IE</h3>
<p>IE9 is supposed to support HTML5 when it&#x2019;s out, but for now we have to tell IE what type those elements are. To not complicate things too much, all we need to do is make a use of <a href="http://remysharp.com/2009/01/07/html5-enabling-script/">this awesome script</a>. Just paste it within your <em>head</em> tag.</p>
<pre><code class="language-html">&lt;!--[if IE]&gt;
&lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</code></pre>
<h3 id="samplepagemarkup">Sample page markup</h3>
<pre><code class="language-html">&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
  &lt;title&gt;Title&lt;/title&gt;
  &lt;meta charset=&quot;utf-8&quot; /&gt;
  &lt;meta http-equiv=&quot;imagetoolbar&quot; content=&quot;no&quot; /&gt;
  &lt;meta name=&quot;robots&quot; content=&quot;index, follow&quot; /&gt;
  &lt;meta name=&quot;keywords&quot; content=&quot;Keywords&quot; /&gt;
  &lt;meta name=&quot;description&quot; content=&quot;Description&quot; /&gt;
  &lt;!--[if IE]&gt;
    &lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;
  &lt;![endif]--&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div id=&quot;wrapAll&quot;&gt;
    &lt;header&gt;
      &lt;nav&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 2&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 3&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
    &lt;/header&gt;
    &lt;section&gt;
      &lt;article&gt;
        &lt;header&gt;
          &lt;h1&gt;Article Header&lt;/h1&gt;
          &lt;time datetime=&quot;2010-06-15&quot; pubdate&gt;June 15th, 2010&lt;/time&gt;
        &lt;/header&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/p&gt;
      &lt;/article&gt;
    &lt;/section&gt;
    &lt;footer&gt;
      Footer content
    &lt;/footer&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Gmail's recent email rendering change]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h3 id="problem">Problem</h3>
<p>Gmail recently made a few changes in their email rendering engine. Unfortunately for us our image based HTML newsletters that used to look fine in gmail are now broken. Each image seems to have a weird spacing after it.<br>
If you&#x2019;ve been sending HTML newsletters for your</p>]]></description><link>https://allurcode.com/gmails-recent-email-rendering-change/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea122</guid><category><![CDATA[CSS]]></category><category><![CDATA[email]]></category><category><![CDATA[gmail]]></category><category><![CDATA[Google]]></category><category><![CDATA[HTML]]></category><category><![CDATA[image]]></category><category><![CDATA[spacing]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Tue, 01 Jun 2010 10:14:28 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h3 id="problem">Problem</h3>
<p>Gmail recently made a few changes in their email rendering engine. Unfortunately for us our image based HTML newsletters that used to look fine in gmail are now broken. Each image seems to have a weird spacing after it.<br>
If you&#x2019;ve been sending HTML newsletters for your clients for some time now, you probably have your own email templates that work well in all email clients. Well not anymore thanks to Google.</p>
<h3 id="solution">Solution</h3>
<p>To make things back to what they were just add <code>style=&quot;display:block;&quot;</code> to every img tag in your HTML email and we&#x2019;re back in business.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Google font api and font directory]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Google just made our life much easier by announcing <a href="http://code.google.com/apis/webfonts/">Google font api</a> and <a href="http://code.google.com/webfonts">Google font directory</a>.<br>
Using custom fonts on your website is as easy as adding two lines of code. Lets consider this simple example.</p>
<pre><code class="language-html">&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;title&gt;Custom</code></pre>]]></description><link>https://allurcode.com/google-font-api-and-font-directory/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea120</guid><category><![CDATA[api]]></category><category><![CDATA[CSS]]></category><category><![CDATA[font]]></category><category><![CDATA[Google]]></category><category><![CDATA[HTML]]></category><category><![CDATA[Tangerine]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Sun, 23 May 2010 12:08:36 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Google just made our life much easier by announcing <a href="http://code.google.com/apis/webfonts/">Google font api</a> and <a href="http://code.google.com/webfonts">Google font directory</a>.<br>
Using custom fonts on your website is as easy as adding two lines of code. Lets consider this simple example.</p>
<pre><code class="language-html">&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;title&gt;Custom fonts&lt;/title&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;style&gt;
      p {
        font-size: 48px;
      }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;header&gt;
        &lt;p&gt;Hello world!&lt;/p&gt;
    &lt;/header&gt;
&lt;/body&gt;
</code></pre>
<p>Nothing fancy here, result as expected:</p>
<p>Hello world!</p>
<p>Now lets add those two aforementioned lines. Line 6 and line 9 in below listing.</p>
<pre><code class="language-html">&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;title&gt;Custom fonts&lt;/title&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;link href=&apos;http://fonts.googleapis.com/css?family=Tangerine&apos; rel=&apos;stylesheet&apos; type=&apos;text/css&apos;&gt;
    &lt;style&gt;
      p.tangerine {
        font-size: 48px;
        font-family: &apos;Tangerine&apos;, serif;
      }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;header&gt;
        &lt;p&gt;Hello world!&lt;/p&gt;
    &lt;/header&gt;
&lt;/body&gt;
</code></pre>
<p>and the effect:</p>
<link href="http://fonts.googleapis.com/css?family=Tangerine" rel="stylesheet" type="text/css">
<style>
  p.tangerine {
    font-size: 48px;
    font-family: 'Tangerine', serif;
  }
</style>
<p class="tangerine">Hello world!</p>
<p>The font directory is a bit limited at the moment but I think we can safely assume that Google will be adding more fonts over time.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>