<hr> has a default style that puts it on a new line. However, this default style can be overloaded, just like with any other element. <hr> is essentially nothing more than an empty <div> with a default border setting.
To demonstrate this, try the following:
<div>Blah blah<hr style='display:inline-block; width:100px;' />dfgdfg</div>
There are several ways to override the <hr> style to achieve your goal.
You can try using display:inline-block; along with setting width , as I said above. The downside of this approach is that it requires you to know the desired width, although there are ways to get around this - width:100%; , and the entire line in the <div> container that has overflow:hidden; can do the trick, for example:
<div style='overflow:hidden; white-space:nowrap;'>Blah blah<hr style='display:inline-block; width:100%;' /></div>
Another option is to use float:left; . You need to apply this to all elements of the string, and I do not like it, because I found that float tends to cause more problems than it solves. But try and see if this works for you.
There are various combinations of styles that you can try - let him know what works.
Spudley
source share