2014-09-22 65 views
-5

「hr」元素創建類似於段落元素「p」的新行嗎?因爲我增加了一個「HR」元素,以我的表元素,它給出了這樣的圖像中的結果:看起來<hr>創建新行

enter image description here

編輯:

<fieldset style="border: solid 1px "><legend>alertes offres/demandes</legend> 
<div><a href="service.php?action=ServiceAjouterAlerteOD"><img src="http://localhost/bazarmada/pages/img/icons/plus.png" alt="Ajouter un alerte d'abonnement" /></a></div> 
<div style="background-color:#cafbb7;"><b>March&eacute; : </b>Ambalavao</div> 
<table width="100%"> 
    <tr> 
     <td align="center" width="25%">Mardi</td> 
     <td align="center" width="60%">Akotry</td> 
     <td align="center" width="5%"><input type="checkbox" value="12" checked onchange="aboDesabo($(this), $(this).val(), 'Akotry');" /></td> 
     <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=12"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td> 
     <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(12);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td> 
    </tr> 
    <tr> 
     <td align="center" width="25%"></td> 
     <td align="center" width="60%">Akotry gasy</td> 
     <td align="center" width="5%"><input type="checkbox" value="13" onchange="aboDesabo($(this), $(this).val(), 'Akotry gasy');" /></td> 
     <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=13"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td> 
     <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(13);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td> 
    </tr> 
    <tr> 
     <td align="center" width="25%"></td> 
     <td align="center" width="60%">Akotry sebota</td> 
     <td align="center" width="5%"><input type="checkbox" value="14" onchange="aboDesabo($(this), $(this).val(), 'Akotry sebota');" /></td> 
     <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=14"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td> 
     <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(14);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td> 
    </tr> 
    <tr> 
     <td align="center" width="25%"></td> 
     <td align="center" width="60%">Akotry tsipala</td> 
     <td align="center" width="5%"><input type="checkbox" value="15" checked onchange="aboDesabo($(this), $(this).val(), 'Akotry tsipala');" /></td> 
     <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=15"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td> 
     <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(15);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td> 
    </tr> 
</table> 
<div style="background-color:#cafbb7;"><b>March&eacute; : </b>Merimandroso</div> 
<table width="100%"> 
    <tr> 
     <td align="center" width="25%">Lundi</td> 
     <td align="center" width="60%">Peta kofehy</td> 
     <td align="center" width="5%"><input type="checkbox" value="11" checked onchange="aboDesabo($(this), $(this).val(), 'Peta kofehy');" /></td> 
     <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=11"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td> 
     <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(11);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td> 
    </tr> 
    <tr><td colspan="5"><hr /></td></tr> 
    <tr> 
     <td align="center" width="25%">Jeudi</td> 
     <td align="center" width="60%">Rary penjy</td> 
     <td align="center" width="5%"><input type="checkbox" value="19" checked onchange="aboDesabo($(this), $(this).val(), 'Rary penjy');" /></td> 
     <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=19"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td> 
     <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(19);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td> 
    </tr> 
</table> 

那麼如何去除空白「hr」元素上下的線?

+1

這不就是其中''


標記是? – Azrael 2014-09-22 08:08:08

+0

爲什麼不在你的細胞上放置一個邊框?像'td {border-bottom:solid 1px #CCC; }' – misterManSam 2014-09-22 08:08:32

+0

但我想要像上面四行那樣的行;怎麼做 ? – pheromix 2014-09-22 08:08:50

回答

1

默認<hr>標記顯示一條水平線。但在你的情況下,可以有一個覆蓋默認外觀的CSS規則。使用inspect元素並檢查表中hr標籤的匹配CSS規則。

我的測試Test

+0

是的,在CSS文件中有一個邊緣底部樣式,並且我在「hr」元素中內聯了這個樣式。 – pheromix 2014-09-22 08:34:55

相關問題