I’m using the CSS below to style the header with a margin at the top which works fine.
However if I add: margin-left: 10px ; or: margin-right: 10px ; then I get an unexpected result where the header is no longer centred and also no longer ‘contained’.
(ie it goes wider than contained width and floats off to one side.)
thats correct, to center an element we use margin-left: auto; and margin-right: auto; so by adding a value you break that.
Instead try reducing the site header max-width:
I’ve used the CSS below as suggested which does fix the max width problem but the header is not staying in the site container and is off on the left side when over 1300px wide.