html - 如何在将鼠标悬停在元素上时阻止其他表格元素向右移动

标签 html css css-position

我有一个链接表,当我将鼠标悬停在它们上面时,它们应该会变粗。它工作正常,但它会将元素推向右侧。我该如何解决?

PS:我认为我的 CSS 很糟糕。你认为我应该改变它以摆脱这些问题吗?

              <table class="table" id="right-personal">
                    <tr class="left">
                        <td>
                            <img class="icon" src="img/twitter_alt.png"/>
                            <a href="http://twitter.com/ozmen_burak">twitter.com/ozmen_burak</a>
                        </td>
                        <td>
                            <img class="icon" src="img/facebook.png"/>
                            <a href="http://facebook.com/ozmen.b">facebook.com/ozmen.b</a>
                        </td>
                    </tr>

                    <tr class="right">
                        <td>
                            <img class="icon" src="img/quora.png"/>
                            <a href="http://twitter.com/ozmen_burak">twitter.com/ozmen_burak</a>
                        </td>
                        <td>
                            <img class="icon" src="img/github_alt.png"/>
                            <a href="http://github.com/bozmen">github.com/bozmen</a>
                        </td>
                    </tr>
                </table>

http://jsfiddle.net/XxLeY/

最佳答案

尝试在 td 元素上设置固定宽度。

关于html - 如何在将鼠标悬停在元素上时阻止其他表格元素向右移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22327223/

相关文章:

html - 使用 Bootstrap 响应表

html - 为什么按钮没有对齐?

jquery - 在选项卡内使用 iframe

html - 设置显示高度 :table-cell DIV

javascript - 使用 jQuery 和 CSS 过滤内容

html - 我们如何在绝对定位的 div 中居中 iframe

子元素的 Jquery 迭代

html - 如何放大表单元素周围的 'click-zone'?

html - Div 背景颜色与其他 div 重叠,但内容不重叠

html - 使用位置 : relative 将文本和图像定位为水平居中