SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Joomla iframe height 100%?

    Hi all,

    So I've been developing a website and come across a particular problem. I am trying to iframe a property search however the iframe won't adjust to the content height of 100%. I've tried using some of the code suggested in this thread - http://forum.joomla.org/viewtopic.php?t=612934. This doesn't solve my issue so I'm wondering if anyone here knows the answer?

    Cheers.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,212
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by AirFor View Post
    the iframe won't adjust to the content height of 100%.
    Does the iframe container have a height set? height: 100% is a tricky area and generally doesn't work the way people expect—not with CSS, anyway. In that thread they are utilizing JavaScript, which may be your only option here. However, we'd need to see your page to be able to help.

  3. #3
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Does the iframe container have a height set? height: 100% is a tricky area and generally doesn't work the way people expect—not with CSS, anyway. In that thread they are utilizing JavaScript, which may be your only option here. However, we'd need to see your page to be able to help.
    Hi ralph,

    The iframe container (content inside the iframe) does not have a set height. The site I'm working on is http://dbelldesign.com.au/steveway/ and the search results I'm trying to iframe are located at http://steveway.com.au

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,212
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    How do you actually want this to appear? I'd suggest letting the wrapper around the iframe just sit snugly around it, rather than trying to force the height of the iframe ... which is hard to do when the content is coming from an external source.

  5. #5
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    How do you actually want this to appear? I'd suggest letting the wrapper around the iframe just sit snugly around it, rather than trying to force the height of the iframe ... which is hard to do when the content is coming from an external source.
    At the moment the content is coming from a Joomla module (wrapper) which links the iframe content. I'm not sure how I can enable this to fit unless I specify a pixel height.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,212
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    It's not really clear what you do and don't have access to. Can you edit the CSS on things like the <div class="rt-block component-block">?

  7. #7
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    It's not really clear what you do and don't have access to. Can you edit the CSS on things like the <div class="rt-block component-block">?
    I can as that is part of the template. I can possibly edit the remote content as well if that would help, I just need to gain access for that.

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,212
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Can you maybe post a screen shot of how you want this to appear?

  9. #9
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Can you maybe post a screen shot of how you want this to appear?


    So that's giving the iframe a height in pixels, however on pages that display less properties the iframe remains the same height. My only other option is to have a scroll bar inside the iframe.

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,212
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Hm, the Steveway page that you linked to has 2 items, and everything seems quite snug there (in Chrome). Is this a browser issue, or am I missing something?

  11. #11
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Hm, the Steveway page that you linked to has 2 items, and everything seems quite snug there (in Chrome). Is this a browser issue, or am I missing something?
    2 items? Can you explain some more please? Basically the rentals and sales searches are there, however the problem is the height of the iframe not being 100% or aligned with the bottom of the content.

  12. #12
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any ideas? The issue is still the 100% height or auto height fit for content.


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
  •