<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0">
    <title>Comments for Styling the hr tag</title>
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag" />
    <link rel="self" type="application/atom+xml" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag" />
    <id>tag:bradchoate.com,2007://4-</id>
    <updated>2005-08-19T09:44:51Z</updated>
    <subtitle>The man, the legend.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type -en-trunk--20070910</generator>
 

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:643</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c643" />
    <title>Comment from Oliver Boermans on 2003-01-29</title>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://ollicle.com/underconstruction/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://ollicle.com/underconstruction/">
        There are significant differences between browsers when it comes to styling a HR.

<p>Craig Saila explains:<br />
http://www.saila.com/usage/tips/defn.shtml?hr</p>]]>
    </content>
    <published>2003-01-29T13:00:32Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:646</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c646" />
    <title>Comment from Frank on 2003-01-30</title>
    <author>
        <name>Frank</name>
        <uri>http://fragment.nl</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://fragment.nl">
        you can still set the border-style to none and for some browsers you even need to set the background on the HR to the same color as the page/div background.

<p>to get a 1 pix line with no shadows I use this on my site:</p>

<p>hr{height: 1px;<br />
border-style: none;<br />
color: #d0d0d0;<br />
background-color: #C0C0C0;<br />
}</p>

<p>I've checked the site with various windows browsers (moz, ie, opera) and it seems to work for all of them. no idea bout Macs though...</p>]]>
    </content>
    <published>2003-01-30T11:59:30Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:653</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c653" />
    <title>Comment from mini-d on 2003-01-31</title>
    <author>
        <name>mini-d</name>
        <uri>http://www.minid.net</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.minid.net">
        I don't understand why you use and [hr], you could set a bottom border to a main div wich encloses all the posts for the day... like i use in myweblog... set the margin-bottom to 0 and adding 20px of padding so content will not get close to the other headings...]]>
    </content>
    <published>2003-01-31T22:57:12Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:654</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c654" />
    <title>Comment from Brad Choate on 2003-01-31</title>
    <author>
        <name>Brad Choate</name>
        <uri>http://www.bradchoate.com/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.bradchoate.com/">
        mini-d: Because I want to display a dividing line inbetween posts for a single day. That line should be styled in particular way. They way I had been doing it was to style the top border of the individual post's 'div' to be a dashed line. This kinda worked, but it put the dashed line at the top of the very first post. Not what I wanted. In order to get it right by using borders on divs would be to have one div style for the first post, then a different one for the ones that follow for that day. I decided to use a 'hr' tag instead since it's more fitting and will render as a divider for textual browsers.]]>
    </content>
    <published>2003-01-31T23:07:27Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:655</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c655" />
    <title>Comment from Nathaniel Riethmann on 2003-01-31</title>
    <author>
        <name>Nathaniel Riethmann</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        Brad:

<p>I'm sure you've already considered this option, but why not just use a little PHP counter in your MT templates to give the first DIV for a day a class of "firstforday" (or something similarly fitting) and remove the top border for that class?  You could still use the HR in your templates -- just use CSS to style it out of existence (display: hidden).  Textual browsers would render it and you wouldn't have to worry about cross-browser HR styling differences.</p>

<p>Of course, if there were wide-spread support for CSS2, you could always do a little first-child pseudo-action, but alas, there isn't.</p>]]>
    </content>
    <published>2003-02-01T05:56:25Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:657</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c657" />
    <title>Comment from Lou on 2003-02-01</title>
    <author>
        <name>Lou</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        A Div as a container for the posts is a better idea as it actually has meaning - the contained elements comprise a post.  You should be able to do something with the .blog + .blog { } CSS selector to specify how styling propogates to subsequent entries without having to rely on the first child selector.]]>
    </content>
    <published>2003-02-01T21:02:52Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:658</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c658" />
    <title>Comment from Stan on 2003-02-01</title>
    <author>
        <name>Stan</name>
        <uri>http://finleydataservices.com/weblog/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://finleydataservices.com/weblog/">
        
	hr {
		text-align: center;
		width: 100%;
		height: 1px;
		color: #bbb;
		border: none;
		} /* For Internet Explorer */
		html>body hr {
		margin-right: 0;
		width: 100%;
		height: 1px;
		background-color: #bbb;
		border: none;
		} /* For Gecko-based browsers */
		html>body hr {
		margin-right: 0;
		width: 100%;
		height: 1px;
		background-color: #bbb;
		border: 0px solid #bbb;
		} /* For Opera and Gecko-based browsers */
]]>
    </content>
    <published>2003-02-01T23:13:31Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:659</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c659" />
    <title>Comment from Brad Choate on 2003-02-01</title>
    <author>
        <name>Brad Choate</name>
        <uri>http://www.bradchoate.com/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.bradchoate.com/">
        I still use a div as a container for the posts, but inbetween the posts I want to indicate a break. For textual browsers, I think the best way to do this (both visually and semantically) is to use the hr tag. If I could style the hr tag the way I wanted in modern browsers, it would be perfect.

<p>But since I can't, I've decided to wrap the hr tags in a special div. This div will only be 1px high and will be styled in the manner I choose. The actual hr within the div will be hidden through the magic of CSS. This allows the hr tag to be the divider I want for textual browsers, but thanks to the 'display:none' rule it has, it's extra padding won't affect the visual design either.</p>

<p><code>.blogbreak hr {<br />
        display:none;<br />
}<br />
.blogbreak {<br />
        border-bottom:1px dashed #777;<br />
        height:1px;<br />
}</code></p>

<p>And is used thusly:</p>

<p><code>&lt;div class="blogbreak"&gt;&lt;hr /&gt;&lt;/div&gt;</code></p>

<p>So far, it looks perfect in every browser I've tried. No CSS hacks necessary. Just the way I like it.</p>]]>
    </content>
    <published>2003-02-02T05:53:52Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2003://4.1424-comment:675</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#c675" />
    <title>Comment from Casey Bex on 2003-02-11</title>
    <author>
        <name>Casey Bex</name>
        <uri>http://www.1heluva.com/cgi-bin/join.cgi?refer=23911</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.1heluva.com/cgi-bin/join.cgi?refer=23911">
        It looks ok in my browser (IE6)]]>
    </content>
    <published>2003-02-11T21:16:43Z</published>
</entry>


<entry>
    <id>tag:bradchoate.com,2003://4.1424-ping:648</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2003://4.1424" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2003/01/29/styling-the-hr-tag#p648" />
    <title>Styling the HR tag revisited</title>
    <author>
        <name>Fragments</name>
        <uri>http://fragment.nl/archive/2003/03/13/styling_the_hr_tag_revisited/index.php</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://fragment.nl/archive/2003/03/13/styling_the_hr_tag_revisited/index.php">
        I wrote about styling the HR tag before, but there&apos;s more to it than I knew then. Marek Prokop has...
    </content>
    <published>2003-03-13T20:23:18Z</published>
</entry>

</feed>