...

View Full Version : How to fix the position of the background image



Mido™
04-06-2011, 10:22 PM
I have a problem in making the position of the background image to be fixed with the changes of the screen resolution.
the problem happen and the the horizontal position of background image change when I open the page on another screen with another resolution.

and this is the css code of the div :

div#main{
width:990px;
margin-right:auto;
margin-left:auto;
padding-top:20px;
padding-bottom:20px;
background:#c5c5c5;
background-image:url(images/filmobk2.jpg);
background-position:19cm 13em;
background-repeat: no-repeat;
background-attachment:fixed;
}

I tried to make it with "em,%,px" and all of them also make it's position change.

BoyWander
04-07-2011, 07:40 AM
Try setting the width of the main div to 97%.


div#main{
width:97%; <-----
margin-right:auto;
margin-left:auto;

You can keep messing with that width until you get it where you want it.
In my experience, 97% is good, try 97.5, 98, 98.5 etc.

Mido™
04-07-2011, 08:05 PM
Try setting the width of the main div to 97%.


div#main{
width:97%; <-----
margin-right:auto;
margin-left:auto;

You can keep messing with that width until you get it where you want it.
In my experience, 97% is good, try 97.5, 98, 98.5 etc.

Thanks but it didn't fix it, the same problem happened also.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum