Embedding the calculator

You can embed the calculator on your own website using an iframe:

<iframe src="http://inflation.stephenmorley.org/calculator/"
        width="264"
        height="200"
        sandbox="allow-scripts allow-top-navigation">

To remove the iframe borders and scroll bars and to centre it horizontally, add the following CSS to your stylesheet:

iframe{
  display  : block;
  margin   : 0 auto;
  border   : 0;
  overflow : hidden;
}

Responsive sites

The calculator has a fixed width of 264 pixels, and is therefore small enough to be displayed on mobile screens. To use the calculator on a responsive site, ensure it is placed within a column that will always be at least 264 pixels wide.

Internet Explorer 8

Internet Explorer 8 does not allow the iframe border to be removed using CSS. If you need to support Internet Explorer 8, you can use the deprecated frameborder attribute to remove the border:

<iframe src="http://inflation.stephenmorley.org/calculator/"
        width="264"
        height="200"
        frameborder="0"
        sandbox="allow-scripts allow-top-navigation">