This page demonstrates a slight CSS rendering bug in Apple's new Safari browser, based on a similar test page by Sylvan Korvus. The page renders correctly in Mac IE 5.2 and Mozilla.
The bug is that zero-width dotted or dashed borders show up as 1px dashed borders if any other side of the box has positive-sized borders. Zero-width borders of other styles are not affected. The workaround is to ensure that one is not defining zero-widths as a substitute for defining border-style:none
.
Note also that the dotted borders appear dashed: dots should be square or round, not elongated. This is the same glitch as Windows IE.
border-color: black;
border-width: 1px;
border-style: solid;
Safari does this right.
border-color: black;
border-width: 1px 0px 1px 0px;
border-style: solid;
Safari does this right.
border-color: black;
border-width: 1px 1px 1px 1px;
border-style: dotted;
Safari does this right, except that dotted borders have that Windows IE dashed look.
border-color: black;
border-width: 1px 0px 1px 0px;
border-style: dotted;
Safari draws the border on all sides. Note that the only difference between this DIV and DIV 2 above is the change in border-style
.
border-color: black;
border-style: dotted;
border-top-width: 1px;
border-bottom-width:1px;
border-left-width:0px;
border-right-width:0px;
border-color: black;
border-style: dotted;
border-width: 10px 0px;
border-top: 1px dotted black;
border-bottom: 1px dotted black;
border-left: 0px dotted black;
border-right: 0px dotted black;
border-color: black;
border-style: dotted;
border-width: 1px 0em;
border-color: black;
border-style: solid dotted;
border-width: 1px 0px;
border-color: black;
border-width: 1px 0px 1px 0px;
border-style: dotted none dotted none;
Acknowledgements: This test page is an expanded version of one by Sylvan Korvus.