Log in

View Full Version : sorry, another iframe question



moscarda
06-28-2007, 09:24 PM
i know iframes are bad news, but guess what, im a bad web designer!

check out the page and the code: www.livewithanimals.com

its a website i made for some friends with a gallery.

the problem is that the whole site "shifts" when you go to the calendar page, or when you go to another page FROM the calendar page.

anyone have a quick fix?

or, is it possible to make it have the scrollbar on the side of the browser window instead of the side of the iframe!?

Veronica
06-28-2007, 10:34 PM
Actually, the shift isn't because of the iframe, it's because the content of the calendar page isn't long enough to force a scrollbar on the right. In IE, there's a default space for the scrollbar whether its there or not, but not in FF.

You could add more content underneath the iframe to make the page length longer.

You can also force a scrollbar to always be displayed by making the height one pixel longer than 100% in your styles:


html {height: 100%; margin-bottom: 1px;}

moscarda
06-28-2007, 10:37 PM
i think i get what youre saying but its all new to me, can you explain it real simple like

Veronica
06-28-2007, 11:01 PM
Look at your home page. Notice that it has a scrollbar on the right side. That's because the content on that page is longer than the browser window.

The calendar page is missing that scrollbar because the content is NOT longer than the browser window. Any page that doesn't have a lot of content will do the same thing. It has nothing to do with the iframe.

To make a short page (such as the calendar page) have a scrollbar (whether it needs it or not) add this to the head section of the page:


<style type="text/css">
html {height: 100%; margin-bottom: 1px;}
</style>