简体   繁体   English

如何使这些功能<a>适用于Firefox,而不仅仅是Internet Explorer 6</a>

[英]How do I make these <a>'s work for Firefox instead of just Internet Explorer 6

This code only works for Internet Explorer 6, I don't know how to make it work for Firefox. 该代码仅适用于Internet Explorer 6,但我不知道如何使其适用于Firefox。 I'm using hyperlinks that contain table rows to change the content on the page. 我正在使用包含表行的超链接来更改页面上的内容。 However, on firefox the links become unclickable... 但是,在Firefox上,链接变得不可点击...

Here is the CSS: 这是CSS:

#sidebar         {display:block; top:116px; left:11px; width:150px; position:fixed;}   

.sidebarLink     a:hover td { cursor:pointer; background-color:#f60;
                 color:#fff; border: 1px solid #f60;;}
.sidebarLink     td{background-color:#fff; color:#f60; border: 1px solid #ccc;;}
.sidebarLink     {font-family: sans-serif; font-weight: bold; font-size: small;} 

And the HTML: 和HTML:

<div id="sidebar">      
    <table style="table-layout: fixed; word-wrap: break-word border-collapse: collapse;" class="sidebarLink" cellpadding="5" cellspacing="4" width="150">
        <a href="index.php?test=table1"> 
            <tr align="middle">
                 <td>Link 1</td>
            </tr>
         </a>
         <a href="index.php?test=table2">
             <tr width="90" align="middle">
                 <td>Link 2</td>
             </tr>
         </a>
   </table>
</div>

I could turn this into a form with buttons and style the buttons to look like I have the table right now. 我可以将其转换为带有按钮的表单,并对按钮进行样式设置,使其看起来像现在的桌子一样。 The problem is that causes a performance issue with the table itself and the onHover feature so it would be great if someone knows a way to make this function in firefox. 问题是导致表本身和onHover功能导致性能问题,因此如果有人知道在Firefox中实现此功能的方法,那就太好了。

That's completely bogus HTML and I'm amazed it even works in IE6. 这完全是伪造的HTML,我很惊讶它甚至可以在IE6中使用。 You can't just put arbitrary elements between a table and its cells. 您不能只在表及其单元格之间放置任意元素。

It doesn't look like you should need a table for this at all? 看起来您根本不需要一张桌子吗? Just have the two links (maybe in a list) and give them display: inline-block; 只需要两个链接(也许在列表中)并display: inline-block;它们即可display: inline-block; and width: 75px ;. width: 75px

Incidentally, there are more browsers than Firefox and IE6 nowadays, and IE6 has got to be wayyy at the bottom of the popularity ladder by now. 顺便说一句,如今的浏览器比Firefox和IE6还要多,而IE6如今在流行阶梯的底部已经变得风风火火了。 Even Google largely gave up on it years ago. 甚至谷歌几年前也基本上放弃了。

Why not do: 为什么不这样做:

<div id="sidebar">      
    <table style="table-layout: fixed; word-wrap: break-word border-collapse: collapse;" class="sidebarLink" cellpadding="5" cellspacing="4" width="150">

            <tr align="middle">
                 <td><a href="index.php?test=table1"> Link 1</a></td>
            </tr>


             <tr width="90" align="middle">
                 <td><a href="index.php?test=table2">Link 2</a></td>
             </tr>

   </table>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何获得提示(例如cluetip)以在Internet Explorer中工作? - how do i get a tooltip such as cluetip, to work in Internet Explorer? 如何使CSS脉动效果在FireFox和Internet Explorer中工作? - How to get CSS pulsating effect to work in FireFox and Internet Explorer? Object.style.filter =“ Flipv”在Internet Explorer中可以正常工作。 如何在Firefox中进行操作? - Object.style.filter=“Flipv” its working fine in Internet explorer. How can i do in Firefox? 如何在Firefox和Internet Explorer中隐藏或着色iframe滚动条? - How can I hide or color iframe scrollbar in Firefox and Internet Explorer? 如何使链接按钮在Internet Explorer 11上工作? - How to make link button work on Internet explorer 11? 如何使表格行在Internet Explorer中正常工作? - How to make a table row work properly in Internet Explorer? Div不在Internet Explorer中显示,但可以在Chrome,Firefox,Opera等中显示 - Div's don't show in Internet Explorer but do show in chrome, firefox, opera etc 如何在Firefox和Internet Explorer中包含CSS字体? - How to include css font in Firefox and internet explorer? 如何在Internet Explorer和Firefox上将文本包装成2行? - How to wrap the text in 2 lines on Internet Explorer and firefox? 如何使Internet Explorer理解我的SVG CSS - How can i make Internet Explorer understand my SVG css
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM