<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>David Pratt &#187; html</title> <atom:link href="http://daipratt.co.uk/tag/html/feed/" rel="self" type="application/rss+xml" /><link>http://daipratt.co.uk</link> <description>Concerned about Website Construction &#38; SEO</description> <lastBuildDate>Wed, 25 Jan 2012 07:16:58 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.4</generator> <item><title>&#8220;This Page Contains Both Secure and Non-Secure Items&#8221;</title><link>http://daipratt.co.uk/this-page-contains-both-secure-and-non-secure-items/</link> <comments>http://daipratt.co.uk/this-page-contains-both-secure-and-non-secure-items/#comments</comments> <pubDate>Tue, 24 Nov 2009 08:14:12 +0000</pubDate> <dc:creator>David Pratt</dc:creator> <category><![CDATA[Tech]]></category> <category><![CDATA[debugging]]></category> <category><![CDATA[html]]></category> <category><![CDATA[security]]></category> <guid
isPermaLink="false">http://daipratt.co.uk/?p=665</guid> <description><![CDATA[When you get this message on a webpage, you might be needing a protocol-independent absolute path that switches between HTTP and HTTPS.]]></description> <content:encoded><![CDATA[<p>If you are familiar with the message above, then you have probably seen it a hundred times before.</p><div
id="attachment_666" class="wp-caption alignnone" style="width: 342px"><img
src="http://daipratt.co.uk/wp-content/uploads/2009/11/nonsecure-popup.png" alt="This Page Contains Both Secure and Non-Secure Items" title="Most common popup on the web!" width="332" height="158" class="size-full wp-image-666" /><p
class="wp-caption-text">This Page Contains Both Secure and Non-Secure Items</p></div><p>Or</p><div
id="attachment_701" class="wp-caption alignnone" style="width: 493px"><img
src="http://daipratt.co.uk/wp-content/uploads/2009/11/security.png" alt="Do you want to view only the webpage content that was delivered securely" title="security" width="483" height="193" class="size-full wp-image-701" /><p
class="wp-caption-text">Do you want to view only the webpage content that was delivered securely</p></div><p>It is caused (as I&#8217;m sure you can figure out from the title) by having non-secure items on a secure page i.e. having an asset that sits on the HTTP protocol being called from a secure HTTPS page.  This often occurs on checkout confirmation pages, or sign up thank you pages where a developer has a included an absolute path to something that sits on the HTTP protocol.  In my experience this is very often 3rd party tracking pixels or marketing banners that have been added as an afterthought.</p><p>There is a very straightforward solution to this problem however, all you need to do is use a protocol-independent absolute path that switches between HTTP and HTTPS depending on what protocol the asset is currently sat on. To do this you need to modify (in the case of images) the src path so that it looks something like:</p><pre class="brush: php">
&lt;img src="//daipratt.co.uk/i/tracking.png"/&gt;
</pre><p>All I have done here is drop the &#8220;http:&#8221; from the url, leaving the &#8220;//&#8221; behind.  If you are looking at a page in SSL through HTTPS, then what it will do is request that asset with the HTTPS protocol, otherwise it&#8217;ll request it with HTTP.  This then prevents the annoying error message as all of the page assets are sat on the same protocol.</p> ]]></content:encoded> <wfw:commentRss>http://daipratt.co.uk/this-page-contains-both-secure-and-non-secure-items/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Dots appearing around images when you click them</title><link>http://daipratt.co.uk/dots-appearing-around-images-when-you-click-them/</link> <comments>http://daipratt.co.uk/dots-appearing-around-images-when-you-click-them/#comments</comments> <pubDate>Sun, 22 Nov 2009 11:42:30 +0000</pubDate> <dc:creator>David Pratt</dc:creator> <category><![CDATA[Tech]]></category> <category><![CDATA[css]]></category> <category><![CDATA[html]]></category> <guid
isPermaLink="false">http://daipratt.co.uk/?p=641</guid> <description><![CDATA[To fix this, set the outline property of the anchor element to zero, like so: a{outline:0};]]></description> <content:encoded><![CDATA[<p>A quick tip!  If you every get an undesirable dotted border appearing around an image when you click it e.g:</p><div
id="attachment_643" class="wp-caption alignnone" style="width: 346px"><img
class="size-full wp-image-643" title="Undesirable dots around an image" src="http://daipratt.co.uk/wp-content/uploads/2009/11/Picture-1.png" alt="Dots appearing around an image after you click it" width="336" height="209" /><p
class="wp-caption-text">Dots appearing around an image after you click it</p></div><p>All you need to do to fix it is set the outline property of the anchor element to zero, like so:</p><pre class="brush: plain">
a{outline:0};
</pre><p>Happy days.</p> ]]></content:encoded> <wfw:commentRss>http://daipratt.co.uk/dots-appearing-around-images-when-you-click-them/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Wrap text on an HTML input button with CSS</title><link>http://daipratt.co.uk/wrap-text-on-an-button-with-css/</link> <comments>http://daipratt.co.uk/wrap-text-on-an-button-with-css/#comments</comments> <pubDate>Thu, 19 Nov 2009 16:43:16 +0000</pubDate> <dc:creator>David Pratt</dc:creator> <category><![CDATA[Tech]]></category> <category><![CDATA[css]]></category> <category><![CDATA[html]]></category> <guid
isPermaLink="false">http://daipratt.co.uk/?p=609</guid> <description><![CDATA[You can wrap text on a HTML button by using the white-space:normal; CSS rule. This tutorial shows you how.]]></description> <content:encoded><![CDATA[<p>Text on a standard HTML input button doesn&#8217;t wrap by default, which can be a bit of a pain if you need to say something a bit more descriptive than a typical  &#8220;add&#8221;, &#8220;go&#8221; or &#8220;submit&#8221;.   The default behaviour for the width of a button is to expand the width to fit the text within &#8211; as with all inline elements.</p><p>When you have a lot of text within the value attribute of a button, it renders something like this:</p><p
class="center"> <input
type="button" value="A lot of descriptive text on a button" /></p><pre class="brush: php">
&lt;input type="button" value="A lot of descriptive text on a button" /&gt;
</pre><p>If you then reduce the width of the button with a bit of css, you get cropped button text like so:</p><p
class="center"> <input
type="button" value="A lot of descriptive text on a button" style="width:100px;" /></p><pre class="brush: php">
&lt;input type="button" value="A lot of descriptive text on a button" style="width:100px;" /&gt;
</pre><p>To wrap the text on the button isn&#8217;t immediately obvious, you might try altering the display property, but it probably won&#8217;t occur to you to try the following css rule:</p><pre class="brush: plain">
white-space:normal;
</pre><p>Which will produce something like:</p><p
class="center"> <input
type="button" value="A lot of descriptive text on a button" style="width:100px; white-space:normal;" /></p><pre class="brush: php">
&lt;input type="button" value="A lot of descriptive text on a button" style="width:100px; white-space:normal;" /&gt;
</pre><p>Now ain&#8217;t that great! It doesn&#8217;t work in IE6 by the way, so you might need a plan B&#8230;</p><p>If you can make do without wrapping the text on the button, you should check out this method to <a
href="http://www.p51labs.com/simply-buttons-v2/">make prettier buttons</a>.</p> ]]></content:encoded> <wfw:commentRss>http://daipratt.co.uk/wrap-text-on-an-button-with-css/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
