tags:

views:

55

answers:

3

I have a 40x1000 jpg file for my background. My CSS is as follows:

body
{
    margin: 0px;
    padding:0 px;
    text-align: center;
    background-image: url(jute_for_web1.jpg) ;
    background-repeat: repeat-x;
    font: 11px Verdana, Geneva, Arial, Helvetica, sans-serif;
    border-top:0px;
    height:100%;
    width:100%;
}
div.container
{
    text-align: left;
    border-color: Black;
    border-width: 0px;
    border-style: solid;
    width: 1000px;
    height: 768px;
    margin: 5px auto;
    background-color:White;
}

This stretches my image. What am I doing wrong?

+1  A: 

it does not stretch your image..

You just place the .container on top of the background image, and since you have background-color:white on the container, the image at the body does not get displayed..

tell us what you want to do exactly and we can help more ..

Gaby
But the repeated background image will be visible outside the container.
Gert G
@Gert, The container is rather large, and most likely hides most of the backgorund.. i think that is why he believes the image gets stretched.. because he only sees a small part of it ..
Gaby
Might be. I'm using 1280x1024, so for me, the image showed.
Gert G
A: 

Some of your HTML may be helpful. In this example, the image appeared correctly. (I made an image using the same name.)

<html>
    <head>
        <style type="text/css">
            body
            {
                margin: 0px;
                padding:0 px;
                text-align: center;
                background-image: url(jute_for_web1.jpg) ;
                background-repeat: repeat-x;
                font: 11px Verdana, Geneva, Arial, Helvetica, sans-serif;
                border-top:0px;
                height:100%;
                width:100%;
            }
            div.container
            {
                text-align: left;
                border-color: Black;
                border-width: 0px;
                border-style: solid;
                width: 1000px;
                height: 768px;
                margin: 5px auto;
                background-color:White;
            }
        </style>
    </head>
    <body>
        <div class="container">
            Hello World!
        </div>
    </body>
</html>
JYelton
Is there a way to upload an image here so that I can show you what I see?
yaip
Take a look at http://yfrog.com/jojutej
JYelton
This is the image:http://yfrog.com/jk1d6jand it renders as:http://yfrog.com/j5fbqp
yaip
A: 

Is there a way to upload an image here so that I can show you what I see?

yaip
You should add this "answer" to your question, or as a comment somewhere, since it's not technically an answer. But for something quick and easy, try imageshack.us
JYelton