object-fit, object-positioning and absolute positioning

The image is a replaced element so the use of top/left/right/bottom will not work like it will do with a non-replaced element (a simple div for example). Here is the relevant parts from the specification: https://www.w3.org/TR/CSS2/visudet.html#abs-replaced-width https://www.w3.org/TR/CSS2/visudet.html#abs-replaced-height To make it easier the computed height/width of your image aren’t defined by the top/bottom and right/left values … Read more

Targeting position:sticky elements that are currently in a ‘stuck’ state

There is currently no selector that is being proposed for elements that are currently ‘stuck’. The Postioned Layout module where position: sticky is defined does not mention any such selector either. Feature requests for CSS can be posted to the www-style mailing list. I believe a :stuck pseudo-class makes more sense than a ::stuck pseudo-element, … Read more

How to stick table header(thead) on top while scrolling down the table rows with fixed header(navbar) in bootstrap 3?

This can now be done without JS, just pure CSS. So, anyone trying to do this for modern browsers should look into using position: sticky instead. Currently, both Edge and Chrome have a bug where position: sticky doesn’t work on thead or tr elements, however it’s possible to use it on th elements, so all … Read more

WPF WebBrowser Control – position:fixed Element jumps while scrolling (Windows 8)

If there are discrepancies in behavior of the same web page loaded into WebBrowser control and standalone IE browser, the problem can often be fixed by implementing WebBrowser Feature Control. Once the feature control has been implemented, it makes sense to verify that <!DOCTYPE html> is observed by WebBrowser and the page is actually rendered … Read more

CSS: display:inline-block and positioning:absolute

When you use position:absolute;, the element is taken out of the normal page flow. Therefore it no longer affects the layout of its container element. So the container element does not take into account its height, so if there’s nothing else to set the height, then the container will be zero height. Additionally, setting display:inline-block; … Read more