Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript iframe width issue

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #245689
    zaahideen
    Participant

    on my website:
    http://idauk.org/index.php?option=com_content&view=article&id=147

    i have a javascript widget from this website:
    http://www.worldtimebuddy.com/event-widgets

    the problem i am having is that it isnt responsive. hence when i access my website on a phone, it cuts off.

    looking at the html, it seems to be a iframe. is there anyway of using something like width=auto or width=100% to resize the widget so it fits on narrow screens?

    #245692
    Beverleyh
    Participant

    Although you can make the width of the iframe 100% in your own page, it would have no bearing on the page displayed through the iframe if that itself isn’t responsive.

    I see on the supplier’s website that there are different widget options though, so maybe you could create 2 widgets and display the larger one on wide viewports and a smaller one on mobile?

    #245722
    zaahideen
    Participant

    thanks

    is it possible to make the iframe scrollable? so a user could swipe/scroll accross in the iframe region to view the “cut” part?
    +

    #245723
    Beverleyh
    Participant

    Well, normally you’d use the overflow property with value set as auto. You might need to wrap the iframe in a div and set the overflow on that though. Give it a whirl and see what you come up with.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.