I am trying to create a cordova application with a fixed width and height.If the device width is higher than the application width then it will display inside of the device
Assuming your HTML area is in one nice div container - set its position to "absolute" and then use javascript to explicitly set its X position with xpos = (screenWidth - htmlWidth)/2
You can try to use a container like this:
.container {
background: red;
height: 400px;
width: 600px;
position: absolute;
left: 50%;
transform: translateX(-50%);
text-align: center;
}
<div class="container">
<h1>
hello
</h1>
</div>