IFrames and HTML5 Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 2MuchMark
    Mark of 2Much.net
    • Aug 2004
    • 50932

    #1

    IFrames and HTML5 Help

    Howdy -

    I have an HTML5 Page and I need to add an iframe element with a vertical size that is 80 to 100% the VERTICAL size of the page.

    Setting width=100% works, but setting height=100% does nothing.

    Help!
  • The Truth Hurts
    Zph7YXfjMhg
    • Nov 2002
    • 15743

    #2
    http://stackoverflow.com/a/19228136

    Comment

    • 2MuchMark
      Mark of 2Much.net
      • Aug 2004
      • 50932

      #3
      Originally posted by The Truth Hurts
      Thanks! But no luck... I can set the height to any pixel size I want, but making it 100% using this method doesn't seem to work. Any other ideas?

      Comment

      • wizzart
        scriptmaster
        • May 2006
        • 5246

        #4
        http://jsfiddle.net/3Q774/
        BimboZone

        Comment

        • RummyBoy
          Confirmed User
          • Dec 2009
          • 2157

          #5
          How is HTML5 better than the other HTML?

          Comment

          • afoo
            Registered User
            • Mar 2013
            • 95

            #6
            Originally posted by RummyBoy
            How is HTML5 better than the other HTML?
            http://stackoverflow.com/a/577778

            Comment

            • Vendzilla
              Biker Gnome
              • Mar 2004
              • 23200

              #7
              Originally posted by MarkPrince
              Howdy -

              I have an HTML5 Page and I need to add an iframe element with a vertical size that is 80 to 100% the VERTICAL size of the page.

              Setting width=100% works, but setting height=100% does nothing.

              Help!
              Going to need more info on your code to fix that. Going to depend on your CSS probably.
              You can always make a <div> container like

              Code:
              #div-wrap { position: relative; width: auto; height:300px; margin: 10px auto; padding: 10px; background: transparent;
              }
              in the header or css style sheet

              then put in
              Code:
              <div id="div-wrap">...,[/div]
              Carbon is not the problem, it makes up 0.041% of our atmosphere , 95% of that is from Volcanos and decomposing plants and stuff. So people in the US are responsible for 13% of the carbon in the atmosphere which 95% is not from Humans, like cars and trucks and stuff and they want to spend trillions to fix it while Solar Panel plants are powered by coal plants
              think about that

              Comment

              • 2MuchMark
                Mark of 2Much.net
                • Aug 2004
                • 50932

                #8
                Originally posted by Vendzilla
                Going to need more info on your code to fix that. Going to depend on your CSS probably.
                You can always make a <div> container like

                Code:
                #div-wrap { position: relative; width: auto; height:300px; margin: 10px auto; padding: 10px; background: transparent;
                }
                in the header or css style sheet

                then put in
                Code:
                <div id="div-wrap">...,[/div]
                Thanks Vendy (really!)

                But the height can't be a fixed amount, like 300px. It has to be a percentage of the total height of the page.

                For example, if you take your browser window now and reduce the horizontal size, this GFY page will change to always fit within the browser. But if you do this with an iframe, the horizontal resizing works but not the vertical resizing.


                Originally posted by RummyBoy
                How is HTML5 better than the other HTML?
                What I am trying to do is make a page that displays a frame on a mobile device. HTML5 still supports iframes, but has limited or no support for regular frames. If I want the rest of the page to display correctly on mobile I have to use HTML5.

                Comment

                • 2MuchMark
                  Mark of 2Much.net
                  • Aug 2004
                  • 50932

                  #9
                  Originally posted by wizzart
                  Thanks! This might do the trick!

                  Comment

                  • Vendzilla
                    Biker Gnome
                    • Mar 2004
                    • 23200

                    #10
                    Originally posted by MarkPrince
                    Thanks Vendy (really!)

                    But the height can't be a fixed amount, like 300px. It has to be a percentage of the total height of the page.

                    For example, if you take your browser window now and reduce the horizontal size, this GFY page will change to always fit within the browser. But if you do this with an iframe, the horizontal resizing works but not the vertical resizing.

                    .
                    Then I would have to see the whole page to figure it out, this is just a little fix that helps out a lot. And it's html5 compliant and works on mobile.
                    Carbon is not the problem, it makes up 0.041% of our atmosphere , 95% of that is from Volcanos and decomposing plants and stuff. So people in the US are responsible for 13% of the carbon in the atmosphere which 95% is not from Humans, like cars and trucks and stuff and they want to spend trillions to fix it while Solar Panel plants are powered by coal plants
                    think about that

                    Comment

                    • Vendzilla
                      Biker Gnome
                      • Mar 2004
                      • 23200

                      #11
                      Originally posted by RummyBoy
                      How is HTML5 better than the other HTML?
                      Compliance with html5 standards means it works on mobile and tablets, where a lot of your traffic is going to come from.

                      That's why most everyone uses divs instead of tables

                      Great tool to make sure your code is good
                      http://validator.w3.org/
                      Carbon is not the problem, it makes up 0.041% of our atmosphere , 95% of that is from Volcanos and decomposing plants and stuff. So people in the US are responsible for 13% of the carbon in the atmosphere which 95% is not from Humans, like cars and trucks and stuff and they want to spend trillions to fix it while Solar Panel plants are powered by coal plants
                      think about that

                      Comment

                      • wizzart
                        scriptmaster
                        • May 2006
                        • 5246

                        #12
                        Originally posted by MarkPrince
                        Thanks! This might do the trick!
                        glad to help ;)
                        BimboZone

                        Comment

                        Working...