2 replies [Last post]
DexterV
Offline
newbie
Last seen: 18 years 24 weeks ago
Joined: 2004-10-12
Posts: 2
Points: 0

Hi everyone,

I'm trying to place an image ( 736 px X 1148 px ) to an absolute position as a background with the following class code :

.map {
background-repeat: no-repeat;
background-position: 100px 0px;
background-image: url(images/map.gif);
}

Enventhough the positionning seems to work, only 5% or so of the image is displayed.

Any ideas?

Thanks

DexterV
Offline
newbie
Last seen: 18 years 24 weeks ago
Joined: 2004-10-12
Posts: 2
Points: 0

Partial background image display

After trying a few things, I found a simple solution. I included the width and height of the image :

.map {
height: 1200px;
width: 740px;
background-repeat: no-repeat;
background-position: 100px 0px;
background-image: url(images/map.gif);
}

Thanks

LadynRed
Offline
Regular
TN
Last seen: 13 years 30 weeks ago
TN
Timezone: GMT-6
Joined: 2004-10-12
Posts: 14
Points: 0

Partial background image display

You shouldn't need to specify width and height for an image. The real problem likely lies somewhere else in your coding and layout.