0

I have message delimiter but I think it possible to do it faster:

<div style="border-top: 1px solid black; width: 33%; float: left;margin-top: 30px;"></div>
<div style="float: left; margin-top: 25px; width: 33%; text-align: center;">Dzisiaj</div>
<div style="border-top: 1px solid black; margin-top: 30px;width: 33%; float: right;"></div>
<br />

The result is good:

---------- Dzisiaj -----------

But I want to do it like this:

<span class="delimiter">Dzisiaj</span>

Is there any way to do this ?

mitch
  • 2,235
  • 3
  • 27
  • 46

1 Answers1

0

This gives you a fixed-width border, but I don't think it works with percentage widths:

<div style="border-left: 100px solid black; border-right: 100px solid black; text-align: center; line-height: 1px; margin: 0.5em 0;">Dzisiaj</div>
Neil
  • 54,642
  • 8
  • 60
  • 72
  • Thank you but it doesn't work properly. It doesn't work with percents and displays "Dzisiaj: at the right side (not center). – mitch Nov 13 '12 at 14:13
  • @MichałK. I don't know why you are seeing the text at the right but I already knew it probably didn't work with percents. – Neil Nov 13 '12 at 14:30