I am currently working on a software project that includes a QWebView
for displaying HTML
files. However, I am facing an issue with the welcome page not displaying correctly. Instead of having an image between the red lines at the center, it appears unusual. The root cause could be with my HTML
and/or CSS
. Here is a snippet of my HTML
`:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link href="styles/accueil.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div class="container">
<div class="ligne"> </div>
</div>
<div class="ligne"> </div>
</body>
</html>
The corresponding CSS
:
@charset "UTF-8";
/* CSS Document */
body{
background-color:white;
margin:0 auto;
height:100%;
}
html {
overflow-y: scroll;
height:100%;
}
img{
border:none;
}
.container {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -20px;
background-image: url(../icones/accueil.jpg);
background-repeat:no-repeat;
background-position:center center;
}
.ligne{
width:100%;
height: 20px;
background-color:#ee1b2e;
}
Could you point out what might be incorrect in my implementation?
Thank you!
------EDIT------
This issue seems to only occur on XP systems, while it works fine on MAC, Windows 7, and Vista. The expected outcome should resemble this example.