<html>
<head>
<style>
div {
width: 250px;
height: 250px;
margin: auto;
border: solid black 1px;
background-image: url('w3css.gif');
background-repeat: no-repeat;
background-position-x: center;
}
</style>
</head>
<body>
<h1>The background-position-x Property</h1>
<p>Here, the background image will be positioned in the center of the element on x-axis (in this case, the div element).</p>
<div></div>
</body>
<!-- Mirrored from www.w3schools.com/cssref/tryit.php?filename=trycss_background-position-x by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:34:56 GMT -->
</html>