Log in

View Full Version : HR (horizontal rule) code?



ModernRevolutions
01-14-2011, 08:02 PM
I was wondering if there was a way to have a horizontal rule to continue before and after a word? Kinda of like
http://oi52.tinypic.com/ets9df.jpg
is there a code for that?

djr33
01-14-2011, 08:26 PM
You could use CSS to position it like that, but there is no default way to make it stay on the same line.

ModernRevolutions
01-15-2011, 02:46 AM
Why type of CSS code would I need?

djr33
01-15-2011, 03:48 AM
It might depend on the exact situation/layout, but I imagine it would be similar to the CSS you would use to position a div in an unusual way. For example, float:left might help. I'd have to play with it to see how it works. You could also use CSS to try and override the 'block' aspect of an <hr>. Maybe just style="display:inline;" would be enough.

pxlcreations
01-26-2011, 05:25 PM
<head>
<style>
hr{
margin-left:60px;
}

.line{
float:left;
width:100%;
margin-top:-18px;
}

.text{
float:left;
}
</style>
</head>
<body>

<div class="text">Jan 13th</div>
<div class="line"><hr /></div>

</body>