为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Border and Outline are overlapping

  • 5 个回答
  • 1 人有此问题
  • 7 次查看
  • 最后回复者为 cor-el

more options

In my MTML code I have in the style section

   .RB td  {outline:medium solid red;border:10px solid white;}

According to the definitions the outside of the table cell should be red and the inside should be white. However, the border seems to be on both sides of the outline. To see what is happening look at https://freedom-press-alliance.us/ For what it is worth, Edge has the same problem.

In my MTML code I have in the style section .RB td {outline:medium solid red;border:10px solid white;} According to the definitions the outside of the table cell should be red and the inside should be white. However, the border seems to be on both sides of the outline. To see what is happening look at https://freedom-press-alliance.us/ For what it is worth, Edge has the same problem.

所有回复 (5)

more options
more options

Stack overflow is seldom useful. This is a case of the website not doing what the CSS documentation said it should. stack overflow is to help with HTML, CSS, JAVASCRIPT coding errors, not browser errors. PS. I need my email address changed to hmorris@southwest.tn.edu

more options

The outline isn't allocated it's own space (see outline on MDN). In this case, it is being drawn "in" the border.

Col_Boogie said

Stack overflow is seldom useful.

Oh, I don't know, I picked up a trick there:

.RB td {
  border:4px solid red;
  position:relative;
}
/* Generated content trick */
.RB td:before {
  border:6px solid white; 
  position:absolute; display:block; content:''; left: 1px; top:1px;
  height:100%; width:100%; 
  box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;
}
.RB td a {
  margin:6px;
}
more options

Actually, hold on, that creates an attractive inner border but it blocks the link. Maybe you're stuck with one border color, or using a two-color border image.

more options