Kei*_*owe 2 html css html-lists
我以前从未遇到过这个问题而且我很讨厌.我有一个列表,当它盘旋时,它周围会出现一个方框.我有一个列表,如下所示
<div id="sidebar">
<h2>Our Services</h2>
<ul>
<a href="furniture.php"><li>Furniture</li></a>
<a href="kitchens.php"><li>Kitchens</li></a>
<a href="bedrooms.php"><li>Bedrooms</li></a>
<a href="flooring.php"><li>Flooring</li></a>
<a href="externaljoinery.php"><li>External Joinery</li></a>
<a href="commercialwork.php"><li>Commercial Work</li></a>
<a href="staircases.php"><li>Staircases</li></a>
<a href="tiling.php"><li>Tiling</li></a>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
但由于某些原因,firefox不会将整个列表项呈现为链接,只呈现文本.它适用于其他浏览器(甚至是IE),但不适用于Firefox.
Bru*_*oLM 12
更改
<a href="furniture.php"><li>Furniture</li></a>
Run Code Online (Sandbox Code Playgroud)
至
<li><a href="furniture.php">Furniture</a></li>
Run Code Online (Sandbox Code Playgroud)
在UL
你内部你应该有LI
元素,而不是其他任何东西.但是,在里面LI
你可以有其他标签,如A
更新
您可以设置的风格A
,以display:block
作为mwgriffith
对意见建议.
或者要使整行成为一个链接,你也可以在上面指定一个click事件LI
,这里是一个使用jQuery的例子