0

I'm doing a little software that has a QWebViewto display HTMLfiles. My problem is that my welcome page doesn't display well. It looks like this when it should have an image between those red lines, in the center. The problem is surely my HTMLand/or CSS. So here is myHTML`:

<!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">&nbsp;</div>

    </div>

    <div class="ligne">&nbsp;</div>    
</body>
</html>

And my 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;
}

Any idea of what I wrote wrong?

Thanks!

------EDIT------

There's only on XP that happen...on MAC, 7 and Vista it works find. It should look like this

castors33
  • 477
  • 10
  • 26
  • else if someone has another way to make a page like that I would try it! I'm not that good in HTML CSS so I'm opened mind – castors33 Jul 20 '12 at 13:18

2 Answers2

0

I'm not sure exactly why, but the problem was my image...I needed to have a .png image instead of a .jpg

castors33
  • 477
  • 10
  • 26
0

I guess this is when you using program with qwebview on computer where Qt doesn't installed. If so, add to program directory folder [imageformats]. Just copy it from Qtdir. By default Qt supports *.png and *.svg formats, for *.jpg and other formats that set of dll is necessary for windows.

Draken
  • 3,134
  • 13
  • 34
  • 54