include html document in iframe

Discussion in 'HTML & Website Design' started by alexmosutheskypirate, Jul 18, 2006.

  1. #1
    hi
    i want to include a html document into an iframe that has a 270 width and autoscrolling.
    what should i do to the html doc for it to show in the iframe without showing horizontal scrolling??..i mean the html doc must be 269 ..it will contain text mainly..and links..and it can go down with vertical scrolling..but not horizontal.

    
    <html>
    <head>
    <title>alexpop</title>
    </head>
    <link href="alex.css" rel="stylesheet" type="text/css">
    <body bgcolor="#333333">
    <p class="head">firstovall</p>
    hellouu## For security purposes, please check:for the latest version of this MOD. Although MODs are checked
    ## before being allowed in the MODs Database there is no guarantee
    ## that there are no security problems within the MOD. No support
    ## will be given for MODs not found within the MODs Database which
    ## can be found at random text i copied..didn't know what to post xDD
    </body>
    </html>
    
    HTML:
    can someone help?
    it must be kinda easy...but i don't know how to do it
    :confused: :confused: :confused:
    thanks

    saludos :D
     
    alexmosutheskypirate, Jul 18, 2006 IP
  2. [*-AnOnYmOuS-*]

    [*-AnOnYmOuS-*] Active Member

    Messages:
    253
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Hmm.. I think that isn't so hard.. In the src element put in your html document's url. About the scrolling I'm sure it's one of the elements too, you might as well check with any frame/iframe tutorial.

    Just a tip: Try to avoid using frames :D .
     
    [*-AnOnYmOuS-*], Jul 19, 2006 IP
  3. livingearth

    livingearth Well-Known Member

    Messages:
    1,469
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    140
    #3
    I am not totally sure I understand all that you want. I assume you already know how to embed the iframe.

    I would simply put my content in a table with a width attribute of 260px or so and with border=0

    That should work.
     
    livingearth, Jul 19, 2006 IP
  4. DrMalloc

    DrMalloc Peon

    Messages:
    130
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you're talking about what i think you are, this should help:

    http://www.htmlcodetutorial.com/frames/_IFRAME_SCROLLING.html

    Shows how to turn scrollbars off.
     
    DrMalloc, Jul 19, 2006 IP
  5. alexmosutheskypirate

    alexmosutheskypirate Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i don't want to turn off al scrolling..only horizontal scrolling..i want the text..the text from the html..to go down ..the frame..with vertical scrolling..but it cannot have a width bigger than than 270 ...i only want that...i don't care if it is with frame properties or html properties..
    and the html width..i don't know how to do it..cause i put <body width="270">....in the html and it doesn't work...

    still i'll try the table thing..
    i'll tell you if it works..

    thanks !

    saludos :D

    no it does,t work....the table thing..
    or i don't know how to do it..
    can any of you write a simple html code like the one in my first post..but with a 270 width...i can't do it..it seems my width="270" is ignored....
    just make a html file and open it with firefox or iexplore an see for yourself

    
       1.
          <html>
       2.
          <head>
       3.
          <title>alexpop</title>
       4.
          </head>
       5.
          <link href="alex.css" rel="stylesheet" type="text/css">
       6.
          <body bgcolor="#333333">
       7.
          <p class="head">firstovall</p>
       8.
          hellouu## For security purposes, please check:for the latest version of this MOD. Although MODs are checked
       9.
          ## before being allowed in the MODs Database there is no guarantee
      10.
          ## that there are no security problems within the MOD. No support
      11.
          ## will be given for MODs not found within the MODs Database which
      12.
          ## can be found at random text i copied..didn't know what to post xDD
      13.
          </body>
      14.
          </html> 
    
    HTML:
    thanks

    saludos :D
     
    alexmosutheskypirate, Jul 19, 2006 IP
  6. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #6
    
    object {
        width: 270px;
        overflow: auto;
        }
    =========
    <object type="text/html"
            data="some.html">
      <p>See <a href="some.html">the page</a></p>
    </object>
    Code (markup):
    If the imported page can squeeze into a 270px width, you won't have horizontal scrolling. If it won't fit, that's that.

    <iframe> is not valid in any strict DTD, <object> is.

    cheers,

    gary
     
    kk5st, Jul 19, 2006 IP