Constructing an SVG with a seamless 9-slice scaling grid: the sides and the center of this image are flexible, the corners are fixed. Resize the browser window to see the effect in action. This technique doesn't work in Internet Explorer, because "foreignObject" isn't possible in IE. Look out for the "almost" 9-slice scaling grid for a IE compatible solution (https://cdpn.io/exyGh). Read accompanying article here .