Chrome DevTools: Computed style different from css rule?

情到浓时终转凉″ 提交于 2019-12-11 04:28:17

问题


How is it possible that my DOM element has a "border-top-width" of 0px when i defined 4px in my CSS file.

When i inspect the element with Chrome DevTools i see that the computed style tells 0px, whereas the uppermost css rule is 4px. And it isn't even crossed out.

First i thought maybe the CSS file isn't loaded at this time, but when you look at the "border-top-color", you can see that it works (color red is set and displayed).

Where could the 0px come from, what does override my CSS file setting?

Has anyone seen such a behaviour in ChromeDev Tools?

EDIT: Wow you guys are quick, thanks so far! This is the html element. all the computed css properties are in the added picture.

<div id="PageStyleTest2_MeasurementSystemSelector_styled_ddList_11" data-brease-widget="widgets/brease/ListBox" style="width: 150px; height: 120px;" class="breaseListBox breaseWidget widgets_brease_ListBox_style_default">
    <ul>
        <li style="height:40px; " data-brease-value="metric"><span>Metrisch</span></li>
        <li style="height:40px; " data-brease-value="imperial" class="selected"><span>Imperial</span></li>
        <li style="height:40px; " data-brease-value="imperial-us"><span>Imperial U.S.</span></li>
    </ul>
</div>

All computed css styles:

来源:https://stackoverflow.com/questions/44680192/chrome-devtools-computed-style-different-from-css-rule

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!