I'm trying to style some of my elements using absolutely positioned :before
pseudo-elements. Here is how I'm currently achieving this:
.element:before {
content: "";
display: block;
height: 0;
width: 0;
border: 10px solid #ad0c38;
border-right-color: transparent;
border-bottom-color: transparent;
position: absolute;
bottom: 0px;
right: -20px;
}
The problem is, when I have a list with multiple elements styled like that, and the elements have fractioned heights (e.g. height:10.3px
, remembering that you could also get fractioned numbers when using percentages), sometimes the effect will be displaced one pixel up or down. You can see this in action in the following Fiddle:
JS Fiddle with current Behaviour
Is it possible to force an element to always be rounded up (or down), so my element will always have the same pixel height after the browser rounds it?