Forum Moderators: not2easy
hr {
margin:5pt 0 5pt auto;
text-align:right; /* needed for ie <8 */
/*border-bottom: solid #ffcc66; browsers interpret differently, so easiest to set to zero and use height instead */
border:0;
height:4px; /* set to desired height"/
width: 81%;
padding-left: 5pt; /*in the code snippet this doesn't seem necesary */
background-color: #ffcc66; /* for other browsers */
color:#ffcc66; /* needed for ie <8 /*
}
/* Begin Horizontal Rule */
hr{text-align:center;width:auto;height:1px;color:#ddd;border:none;} /* For Internet Explorer */
html>body hr{margin:0;margin-right:0;width:auto;height:1px;background-color:#ddd;border:none;} /* For Gecko-based browsers */
html>body hr{margin:0;margin-right:0;width:auto;height:1px;background-color:#ddd;border:0 solid #ddd;} /* For Opera and Gecko-based browsers */
/* End Horizontal Rule */ [edited by: pageoneresults at 3:43 pm (utc) on Nov 15, 2010]
I tryed with hr, but in opera and chrome it was invisible and in firefox it was misaligned.- Using which code - the css you originally posted, my code sample, or page1's. The reason I'm asking is that yours was for a div, so will have problems, mine works, and page1's should, except it needs a width to stop the ht extending right across the page, and needs to be aligned right as I think you wanted - but that's easily adjusted. So if it's any of the suggested code there must be something else in your styles that is causing the problem.
Plus the validation failed if i added anything inside <hr />It shouldn't. That suggests there is a problem elsewhere in the code.
decide to use div because it works fine on all browsers exept ie6&7Except that you've said ie6&7 don't understand margin-top - which they do. Again, that points to something else causing the problem
div.hr
{
border-bottom: solid #ffcc66;
width: 90%;
margin:0 0 0 auto;
margin-top: 5pt;
margin-bottom: 5pt;
}
<div class="Section1">
<div align="center">
<table class="t1">
<tr>
<td class="t1">
<img class="l1" src="../site/graphics/logo.gif" alt="Creştini Liberali" />
<p class="h2">Creştini Liberali</p>
<p class="h3">Pentru Dumnezeu, şi pentru dragoste.</p>
<div class="hr"></div>
<p class="h4">Căsătoria <font color="#FFCC66">|</font> Mai este
nevoie de ea? <font color="#FFCC66" face="Comic Sans MS" size="3">| </font> De Dave</p>
</td>
</tr>
</table>
</div>
</div> <div class="hrule"><hr></div>
.hrule {styles}
.hrule hr {display: none;}
but I can't think of a scenario where you would need to use it given hr can take an image. Do you have a particular scenario/issue in mind ?
... only connected to surrounding content by it's positioning in the source code - on it's own it has no meaning.Arguably could be said for many html elements - a paragraph only makes sense if there are other para's, really. But one of the things that concerns me is that if assistive technology does not take any special action (such as the pause specified by html3), then it has no value for non-visual users.
Looking at the HTML5 spec, it says about the <section> element:Yes, I think <section> has the potential to become the "new div", despite the warnings in the draft. I also feel the nomenclature was a bit short-sighted, given the immediate adjective/noun confusion - "Is it correct to mark-up this section of my content as a <section>?".
...
do feel that this is one area where the spec is lacking and this element covers too many bases, causing it to not have any clearly defined semantic meaning - which an element specifically to divide text content into 'chapters' would do.
there wasn't time back then to worry about an extra div/span, IE6 had more pressing issuesMany roads lead to Rome - which has seven hills so you can still end up in a different place. My introduction to hr was a few years before your site when I needed a separator to survive email clients. hr proved to be the most robust solution. ... which is toooo ironic ;)
"Is it correct to mark-up this section of my content as a <section>?".oh the joys of trying to explain when/if to use that one, I particularly like the use of the word "blob" in the linked article :) Though come to think of it if you describe it .. "would you naturally pause (or put possibly even use an hr separator) before reading the next section" might be another way to help think of it, at the minute I'm thinking of them a little like nested lists :o after reading that, but I'll try again later