I’m trying to display an image centered and resized by CSS (max-width / max-height, flex). 

This is working fine in Chrome but not in Firefox. What’s wrong?



a {
  border: 1px solid red;
  display: flex;
  height: 100px;
  width: 100px;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 5px;
}
img { 
  max-width: 100%;
  max-height: 100%;
  border: 1px solid green;
}
&lt;a class="frame"&gt;
    &lt;img src="http://placehold.it/500x150"/&gt;
&lt;/a&gt;




See: http://jsfiddle.net/ymLb50w0/2/


Question: Silicone caulk for shower and tub?
Answer: That gap is to small. Push really hard with the float to completely fill it with grout, giving it one more shot; next time caulk it. Caulked tub surrounds are one of my pet peeves; I'm the one who gets to scrape that mess out.

Whether grout or caulk, I like Some Guy's advice: prestress the tub by filling it with water as you work.