html - Border color order -
i have table every border set 1px width solid. want top, left , bottom border black, , right border white. so, used css code
border-right-color: white; border-left-color: black; border-top-color: black; border-bottom-color: black; border: solid 1px; the problem comes in ie9, top right corner pixel white, bottom right corner black.
i suspect problem comes form way ie9 reorganize style, because when @ css of table in developper tools console, ordered :
border-top-color: black; border-right-color: white; border-bottom-color: black; border-left-color: black; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; this let me think that, maybe, order used defined colors makes top border colored black, right border colored white (overwritting top right corner), bottom border colored black (overwritting bottom right corner) , finnaly left border colored left.
the thing that, on white background, top , bottom borders not appear same length (by 1 pixel). may not much, need 2 borders fit other lines on page.
so, how fix this? order borders colored, , if is, how change that?
the order sprecify border colors irrelevant. browsers display borders in different ways. pixels in corner color either of sides, , depends on browser using.
there several different methods used. here common browsers, , how draw corners:
internet explorer:
+----------------------+--+ | | | +----------------------| | | | | | | | | | | | | | | +----------------------+ | | | +--+----------------------+ firefox:
+--+----------------------+ | | | | +----------------------+ | | | | | | | | | | | | +----------------------| | | | | +----------------------+--+ chrome:
+--+----------------------+ | | | | |----------------------+ | | | | | | | | | | | | | +----------------------+ | | | +--+----------------------+ safari:
+--+-------------------+--+ | | | | | |-------------------| | | | | | | | | | | | | | | +-------------------+ | | | | | +--+-------------------+--+ opera:
+-------------------------+ | | +-------------------------+ | | | | | | | | | | | | | +-------------------+ | | | | | +--+-------------------+--+ it looks if different browser vendors went out of way use method different other browsers...
(tested in recent versions. older versions of browser might possibly differently, that's not important differ anyway.)
so, if need full control on how corners drawn, use 2 elements inside each other, put vertical borders on 1 , horisontal borders on other.
Comments
Post a Comment