﻿<?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>Travis Miller &#187; horizontal rules</title>
	<atom:link href="http://www.electrumdigital.com/tag/horizontal-rules/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.electrumdigital.com</link>
	<description>Web Developer for Hire</description>
	<lastBuildDate>Thu, 22 Jul 2010 14:17:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Styling horizontal rules in Internet Explorer 6 &amp; 7</title>
		<link>http://www.electrumdigital.com/2009/07/styling-horizontal-rules-in-internet-explorer-6-7/</link>
		<comments>http://www.electrumdigital.com/2009/07/styling-horizontal-rules-in-internet-explorer-6-7/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 00:48:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX & JavaScript]]></category>
		<category><![CDATA[Browser Issues]]></category>
		<category><![CDATA[horizontal rules]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://www.electrumdigital.com/?p=81</guid>
		<description><![CDATA[Scott Klarr has a nice post about the difficulties of styling horizontal rules with CSS&#8212;owing mainly, of course, to problems in Internet Explorer.
In short, IE 6 and 7 insist on putting a border around horizontal rules, no matter how you set up your stylesheet.
Scott offers a simple but elegant solution which relies on jQuery. That's [...]]]></description>
			<content:encoded><![CDATA[<p>Scott Klarr has <a href="http://www.scottklarr.com/topic/483/how-to-style-hr-elements-with-decorative-horizontal-rules/">a nice post</a> about the difficulties of styling horizontal rules with <acronym title="Cascading Style Sheets">CSS</acronym>&#8212;owing mainly, of course, to problems in Internet Explorer.</p>
<p>In short, <acronym title="Internet Explorer">IE</acronym> 6 and 7 insist on putting a border around horizontal rules, no matter how you set up your stylesheet.</p>
<p>Scott offers a simple but elegant solution which relies on jQuery. That's fine if you're already using jQuery in your project, but if you're not, it's hard to justify the extra payload to fix a simple cosmetic issue.</p>
<p>I've written a standalone version of Scott's script. At less than 350 bytes, it's a very lightweight solution, and it's easy to implement. Here's <a href="/source/js/ie-hr-fix/">a demo page</a>. As Scott's post explains, it simply replaces all <code class="html">&lt;hr /&gt;</code> elements with <code class="html">&lt;div class="iehrfix"&gt;&lt;/div&gt;</code> in the affected versions of <acronym title="Internet Explorer">IE</acronym>.</p>
<p><span id="more-81"></span></p>
<p>Instructions:
<ol>
<li>Mark up your pages with semantically correct &lt;hr /&gt; tags.</li>
<li>Style the horizontal rules however you like in your default stylesheet. (You'll probably be using a background image.)</li>
<li>Prepare a second stylesheet, which we'll feed only to <acronym title="Internet Explorer">IE</acronym> by using <a href="http://www.quirksmode.org/css/condcom.html">conditional comments</a>. It should contain two rules: one which sets <code class="css">display: none;</code> on all <code class="html">&lt;hr /&gt;</code> elements, and one which describes alternate rules for <code class="css">div.iehrfix</code>. You can use <a href="/source/js/ie-hr-fix/iehrfix.css">the demo stylesheet</a> as a starting point.</li>
<li><a href="/source/js/ie-hr-fix/iehrfix.js">Download iehrfix.js</a>.</li>
<li>Place the following code in the <code class="html">&lt;head&gt;</code> of your document:

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if(IE 6)|(IE 7)]&gt;</span>
<span style="color: #808080; font-style: italic;">    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/path/to/iehrfix.css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">    &lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/iehrfix.js&quot;&gt;&lt;/script&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></div></div>

</li>
</ol>
<p>That's it! Browsers other than <acronym title="Internet Explorer">IE</acronym> 6 and 7 will completely ignore the added code. <acronym title="Internet Explorer">IE</acronym> 6 and 7 will execute it on page load; if JavaScript is disabled, <code class="html">&lt;hr /&gt;</code> elements will simply be hidden altogether. (IE 8 handles horizontal rules correctly, and doesn't need the fix.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.electrumdigital.com/2009/07/styling-horizontal-rules-in-internet-explorer-6-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
