...

View Full Version : Background Problem (not aligned correctly)



duderdude2
03-21-2005, 09:34 AM
I'm using a background to create a border effect around my webpage. Problem is, the background border had to align exactly with an image on my website. I think matters are complicated because my website is centered. Here's the page in question:
http://www.gamexplain.com/test2.shtml

Here's the problem: Depending on the user's window size, the background may look just fine, or be off by a pixel,l thus ruining the effect. You'll notice the problem in the top right and top left corners of the bordered image just underneath the top navigation bar. You may have to resize your window horizontally to see the problem.

Am I doing something wrong, or is there another way around this problem?

Edit: Here's a a screenshot I took showing the exact problem:
http://www.gamexplain.com/background.jpg

_Aerospace_Eng_
03-21-2005, 06:14 PM
i see your back to absolute positioning for everything, that is part of your problem, i say restart and try to make your page without absolute positioning, that causes a problem in the long run which you will see you have run into, when u use absolute positioning, i dunno if you know but the element that has it will NEVER move from its spot

duderdude2
03-21-2005, 09:19 PM
i see your back to absolute positioning for everything, that is part of your problem, i say restart and try to make your page without absolute positioning, that causes a problem in the long run which you will see you have run into, when u use absolute positioning, i dunno if you know but the element that has it will NEVER move from its spot

Thanks, but that's what I want. I don't want those images to move from their spots.

harbingerOTV
03-22-2005, 03:20 AM
<DIV style="position: absolute; top:51px; left:1px; width:704px; height:57px"><img src="/images-background/backgroundtop.jpg"></DIV>

is that your problem?

I see it looks fine in IE6 this way.

try this:

replace:
<DIV style="position: absolute; top:51px; left:1px; width:704px; height:57px"><img src="/images-background/backgroundtop.jpg"></DIV>

with:

<DIV id="bgtop"></div>

an in your css put this:

#bgtop {
position: absolute;
top:51px;
left:1px;
width:704px;
height:57px;
background:url(/images-background/backgroundtop.jpg) no-repeat;
}
#bgtop[id] {
left:0;
}

duderdude2
03-22-2005, 08:16 AM
Well, I did that, but I still have the problem. I also tried changing the "left: 1px" to a 0, but it has the same problem. Depending on the site of the user's window, the background may or may not align, always by just 1 pixel.

Thanks for the help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum