html - Why is chrome rendering this CSS in such a way -
i trying create circle icon in css. however, when page first rendered circle looks inverted egg , covers border around slightly. (zoom in browser see issue in more details)
the tricky part is, if open dev tools , change value related it's position(width, height, whatever), snap normal , become circle.
https://jsfiddle.net/2yjashje/
<div class="round-egg"> </div> .round-egg { font-size: 14px; background: white; color: #8dc641; border-radius: 10px; cursor: help; border-bottom: none !important; border: 4px solid #8dc641; width: 20px; height: 20px; text-align: center; }
what going on here?
i put letter "i" in own span , increased margin top vertically centre it. circle, modified border-radius property, , removed border-bottom: none; property well. assuming want circle, need bottom border.
https://jsfiddle.net/2yjashje/3/
<div class="round-egg"> <span class="icon">i</span> </div> .round-egg { font-size: 14px; background: white; color: #8dc641; border-radius: 30px; cursor: help; border: 4px solid #8dc641; width: 20px; height: 20px; text-align: center; display: table-cell; } .icon { display: block; margin-top: 2px; }
Comments
Post a Comment