How do browsers calculate width when child depends on parent, and parent’s depends on child’s
To explain this, I will start with a more simplified example that will produce the same output: <div style=”display:inline-block”> <img src=”https://via.placeholder.com/1000×100″> </div> <div style=”display:inline-block”> <img src=”https://via.placeholder.com/1000×100″ style=”max-width:100%”> </div> <div style=”display:inline-block”> <!– even a big explicit width specified won’t change the behavior –> <img src=”https://via.placeholder.com/1000×100″ style=”wdith:2000px;max-width:100%”> </div> <div style=”display:inline-block”> <img src=”https://via.placeholder.com/1000×100″ style=”width:100%”> </div> We have an … Read more