I have an unordered list that has some list items, and I would like to put a horizontal line (horizontal rule < hr >) in it, right in the middle, with a height of 2px. I tried to vertical-align: middle
but the line stayed on top of the list items. I'd like to put it behind them, it must have some css property that allows that.
List items may or may not appear depending on other factors. That is, with or without list items, the horizontal line should always be in the middle of the div.
Any tips?
Follow the code I have.
<ul>
<hr style="height:2px; border:none; color:#000; background-color:#000; margin-top: 0px; margin-bottom: 0px;">
<? if($primeiro_ponto != NULL && $ultimo_ponto != NULL && $quantidade_de_trajetos>0){foreach($conteudos as $ils){ echo $ils; }}?>
</ul>