<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>WordPress Ideas &#187; Topic: IE7\8 compatibility - &quot;px&quot; attribute on images height\width</title>
		<link>http://wordpress.org/ideas/topic/ie78-compatibility-px-attribute-on-images-heightwidth</link>
		<description>WordPress Ideas &#187; Topic: IE7\8 compatibility - &quot;px&quot; attribute on images height\width</description>
		<language>en-US</language>
		<pubDate>Fri, 24 May 2013 13:42:44 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://wordpress.org/ideas/rss/topic/ie78-compatibility-px-attribute-on-images-heightwidth" rel="self" type="application/rss+xml" />

		<item>
			<title>Ipstenu (Mika Epstein) on "IE7\8 compatibility - &quot;px&quot; attribute on images height\width"</title>
			<link>http://wordpress.org/ideas/topic/ie78-compatibility-px-attribute-on-images-heightwidth#post-23879</link>
			<pubDate>Sun, 16 Dec 2012 18:33:20 +0000</pubDate>
			<dc:creator>Ipstenu (Mika Epstein)</dc:creator>
			<guid isPermaLink="false">23879@http://wordpress.org/ideas/</guid>
			<description><![CDATA[<p>IE 7 and 8 aren't outdated. Yet. 6, yes, but 7 and 8 are in use a lot.</p>
<p>Still this looks like a legit IE bug, so if you want to post it on trac, that would be good :)
</p>]]></description>
					</item>
		<item>
			<title>Pat Hawks on "IE7\8 compatibility - &quot;px&quot; attribute on images height\width"</title>
			<link>http://wordpress.org/ideas/topic/ie78-compatibility-px-attribute-on-images-heightwidth#post-23878</link>
			<pubDate>Sun, 16 Dec 2012 18:07:41 +0000</pubDate>
			<dc:creator>Pat Hawks</dc:creator>
			<guid isPermaLink="false">23878@http://wordpress.org/ideas/</guid>
			<description><![CDATA[<p>According to the HTML spec, <code>height</code> and <code>width</code> are non-negative integers that define the dimensions of the image in CSS pixels.</p>
<p>Filling those attributs with anything other than a non-negative integer breaks compatibility with HTML. This seems a pretty price to pay just to make things a bit easier for out dated browsers.</p>
<p><a href="http://www.w3.org/wiki/HTML/Elements/img#HTML_Attributes" rel="nofollow">http://www.w3.org/wiki/HTML/Elements/img#HTML_Attributes</a>
</p>]]></description>
					</item>
		<item>
			<title>gerald@wpcustoms on "IE7\8 compatibility - &quot;px&quot; attribute on images height\width"</title>
			<link>http://wordpress.org/ideas/topic/ie78-compatibility-px-attribute-on-images-heightwidth#post-23772</link>
			<pubDate>Thu, 29 Nov 2012 21:37:59 +0000</pubDate>
			<dc:creator>gerald@wpcustoms</dc:creator>
			<guid isPermaLink="false">23772@http://wordpress.org/ideas/</guid>
			<description><![CDATA[<p>Hello,</p>
<p>there is a minor bug in the image_hwstring function which took me quite some time to nail down.<br />
I tested a theme in IE7 and IE8 browsers where images are floated with css + some responsive css rules.</p>
<p>those old IE browsers having massive problems when the image height+width attribute is missing "px".<br />
WordPress renders:<br />
<code>height=&#34;100&#34; width=&#34;200&#34;</code><br />
source here:<br />
<a href="http://core.trac.wordpress.org/browser/trunk/wp-includes/media.php#L98" rel="nofollow">http://core.trac.wordpress.org/browser/trunk/wp-includes/media.php#L98</a></p>
<p>IE requires:<br />
<code>height=&#34;100px&#34; width=&#34;200px&#34;</code><br />
google, chrome, safari can handle it easily if PX is missing but as you know IE is always a pain...</p>
<p>To make a long story short:<br />
We came up with this solution and jumped into the get_image_tag function<br />
<a href="http://core.trac.wordpress.org/browser/trunk/wp-includes/media.php#L223" rel="nofollow">http://core.trac.wordpress.org/browser/trunk/wp-includes/media.php#L223</a></p>
<pre><code>function custom_dimensions($html, $id, $alt, $title, $align, $size){
    $html = preg_replace(&#039;%(width&#124;height)(=&#34;[0-9]{1,4})(&#34;)%&#039;, &#039;$1$2px$3&#039;, $html);
    return $html;
}
add_filter(&#039;get_image_tag&#039;, &#039;custom_dimensions&#039;,1, 6);</code></pre>
<p>so my suggestion: please adjust the image_hwstring function and add the px to save a lot of headaches.</p>
<p>looking forward to hearing your opinions on this.<br />
Thank you<br />
Gerald
</p>]]></description>
					</item>

	</channel>
</rss>
