SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: iframes

Hybrid View

  1. #1
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    iframes

    I've come across soething today that I've not worked with before

    I'm using some iframe code and looking at it in my page it is appearing as a small box with scrollers on.
    I would like it to appear in the whole page.
    How does it work with these iframes and why is it showing as a small box.

    Salafi BookShop Cardiff Live Events

    Code:
    <iframe allowtransparency="true" src="http://salafiwales.co.uk/wp-content/themes/Chameleon/liveEvents/event.php?id=1"
    frameborder="0" height="820" scrolling="no"
    width="650"></iframe>

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Just look at the width and height settings you have. On the first one, it's much smaller than what you posted:

    Code:
    <iframe class="preview-frame" src="http://salafiwales.co.uk/wp-content/themes/Chameleon/liveEvents/event.php?id=1" height="240" width="320"></iframe>
    You can change those values. It's best to keep them in proportion, but you can also adjust them until there's no scrolling.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Addict bronze trophy
    Join Date
    Mar 2013
    Location
    Oneonta, NY
    Posts
    307
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    hantaah,

    If you want it to be the whole page just place 100% in the height and width values. If you don’t want scrolling add scrolling=”no” in your iframe tag.

    Alternatively, you can use CSS
    Iframe
    {
    Overflow: hidden;
    }

    Hope that helps,

    Shawn

  4. #4
    SitePoint Evangelist hantaah's Avatar
    Join Date
    Jul 2011
    Location
    Birmingham, Uk
    Posts
    562
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    ahh right, I didn't realside it was as easy as that. I saw something I never saw before and got scared!!!

    Thanks very much, will sort that easy now


Bookmarks

Posting Permissions

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