Results 1 to 3 of 3

Thread: iframe overflow help.

  1. #1
    Join Date
    May 2013

    iframe overflow help.

    I'm making a website for a church/school that doesn't have static content. I'm using PHP to include a header and footer, and using it especially for the calendar and things I've coded from scratch, but many of the pages just contain static content. I'm trying to find a way to make it easy for secretaries and people of the sort to change the static content when needed. The best I've come up with is to have separate pages for content (like PTL.html) and include that in the content area of my generated page. That way they can just use any WYSIWYG editor to create their page (or use Word and Save As Web Page, for that matter).

    Anyway, my problem is with scrolling. When the content is longer than the window is tall, you get a scrollbar in the iframe. I want to include the page so that its entire contents run straight down the page, and the only scrollbar is on the page itself, not within the iframe. I thought setting the iframe scrolling=no and using CSS' overflow: visible would do the trick, but unless I'm missing something, it's not working for me. This is really a problem because 1) if the window is too small for the menu on the left, you could have two side-by-side scrollbars - one for the page, and one for the iframe; and 2) I can't feasibly include my footer.

    Any ideas to fix this, or change how I'm doing it and get it to work in any way possible? Thanks.

    By the way, Firefox was usually the one rendering differently from Safari (yes, I'm on a Mac), where Safari made it look how I wanted. Then I tried something different, and Safari was the one with rendering issues. *sigh*

  2. #2
    Join Date
    Feb 2012
    Pensacola, FL
    I'm not sure of your environment but iFrames are usually a last resort.

    Try one of these methods:
    PHP Code:
    <?php require('mydir/myfile.html'); ?>
    Or, if the file is remote:
    PHP Code:
    <?php echo file_get_contents("http://myremoteurl.com"); ?>
    Good luck!

  3. #3
    Join Date
    Aug 2013
    have you tried overflow hidden you should try using some cms like wordpress and joomla rather than custom php

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center