views:

397

answers:

5

i have code like, sorry i dont have the exact code now. but its valid.

<iframe src="..." borderframe="0" scrolling="no" width=728px" height="90px"></iframe>

the target is a html file that contains code for a banner. everything displays well. but when i resize browser or go to maximize. the content is shiftet to the left by 1 pixel. so the banner is displayed missing the first vertical 1px line. and only 727px is visible.

anyone has an idea?

thank you.

+5  A: 

I have an idea, but you haven't given us the whole picture, so I might be way off.

I would guess that the iframe is positioned with a percentage or some sort of division calculation like 40% left of parent. Then at certain browser widths this number doesn divide evenly and gets truncated. Say it is at 100px in from the left side, and you shrink the parent by 2/3rds so that its positioning would become 66.66 pixels, and the browser cuts this off to 66, giving an apparent error of one pixel left.

Karl
A: 

the code is put "plain" in a div container.

there is no percentage or relative width. :(

A: 

I'm having the same issue. What it seems like is a kind of "rounding error" even though these were supposed to have been fixed in FF since 1.5? The key thing about this I think is that the IFRAME is within a DIV that is centered on the page. When the window size is less than that of the DIV, everything's fine. When the window size increases and the size is brought up to an even (or maybe odd) width, is when the border disappears.

Ben
As the question is quite old, I'll comment at the answer though this also applies to the original question...So after refreshing (after you resized) all is fine again? In which browser(s) do you get this problem? And: is there indeed a one pixel empty space to the right, or does the iframe in fact become smaller (given constantine's answer I assume the latter)? And specific to this answer: what border are you referring to?
Arjan
A very late response to a long ago question, but it was the left border missing. Yes the IFRAME appears to have become smaller by one PX. And Constantine's answer was successful in resolving the problem.
Ben
A: 

solution: u can add 0.5px to width

A: 

Hey thanks! the .5px to the width helped me too!

Levi