Forum Moderators: open

Message Too Old, No Replies

Frame in frameset won't fully center

         

bmil

3:12 pm on May 18, 2007 (gmt 0)

10+ Year Member



I have a frameset with a top frame and a bottom frame (I am aware that framesets are not recommended, but as this is the only way my school taught me to do this type of thing, it's what I used). In the top.html and bottom.html, both are set with 0px for left, right, top, and bottom margins. Both are set to center horizontally.

In Safari and IE, everything looks great. In Opera and Firefox, the bottom frame is moved to the left exactly 16 pixels. If I counter that by adding a 16px margin for the left side, it shows up centered in Opera and Firefox, but is 16px to the right in Safari and IE.

Is this simply because it's a frameset and browsers cannot handle them very well, or might there be an underlying problem I am not aware of? I didn't put any code in here as it didn't seem relevant, but I'd be more than happy to provide any requested code. In advance, thank you for reading, and for any provided suggestions.

Trace

7:45 pm on May 18, 2007 (gmt 0)

10+ Year Member



16 pixels sounds like is just compensating for the scrollbar.

bmil

2:42 am on May 20, 2007 (gmt 0)

10+ Year Member



I believe you are right. I took a screenshot, and the scrollbar is the exact size of the distance the frame moves over.

Is there any way to get certain browsers to ignore that scroll bar so my frames line up properly?

Marshall

3:12 am on May 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try adding padding: 0px in the css or the body tag. Opera does not always recogize the margin setting, but don't ask me why.

bmil

3:51 pm on May 20, 2007 (gmt 0)

10+ Year Member



Good suggestion. Unfortunatly, I already tried that. Originally, I had it with all the margins blank. So I tried adding 0 values to each margin, but no luck.

I'm starting to wonder if I have some hidden object obstructing the frame somewhere. I'll have to try reconstructing the frameset and see if that fixes the error. I'll post here if that solves it.

I do appreciate the suggestions so far, and will also be appreciative if anyone has any further suggestions =)