I am trying to get a horizontal line to work in my blog site, but I am having trouble in displaying the line in google chrome (IE and Firefox display it perfectly).
Basically, in my CSS, I have the following:
div.hr {
background: #fff no-repeat scroll center;
margin-left: 15em;
margin-right: 15em;
width:50em;
height:.05em;
}
div.hr hr {
display: none;
}
In my HTML, I have something like:
<div class="hr"><hr /></div>
For some reason, in google chrome, the line is just not there. The problem now is, I have lots of these (around 25):
and therefore, I am looking to modify only my CSS, so that I can make minimal changes to my HTML.
Upon googling, I see that many have had this problem, but there does not seem to be a proper solution (not considering "drawing" a line and inserting the line as a pic!).
I would appreciate if someone could point me in the right direction to solve the above problem.
Many thanks.
<div class="hr"><hr /></div>when you have the<hr>set todisplay: none;? If you're looking for semantic structure, for screenreader users at least, you've just removed it. You might as well just put the div in there.