Joomla - Keep slider size, but keep the middle part in the center at any screen size

If your slider size is for example 1920px(or less)*500px, then you could create a new module position for the slider, as it is written here, just put it into these codes:

<div style="height:500px; width:100%; position:relative; overflow:hidden;">
	<div style="width:1920px; position:absolute; top:0; left:50%; margin-left:-960px;">
		<jdoc:include type="modules" name="newposition"   />

The div with the relative position would keep the space for the slider, and the div with the absolute position would keep the center of the slider in the middle. You should change the height:500px; and the width:1920px; to the size of your slider, and the margin-left:-960px; where the 960 = 1920 / 2