1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development iFrame not fitting in DIV

Discussion in 'Software' started by TheMusician, 7 Oct 2009.

  1. TheMusician

    TheMusician Audio/Tech Enthusiast/Historian

    Joined:
    13 Jul 2009
    Posts:
    573
    Likes Received:
    32
    Hi,

    I'm working on this page, and I can't seem to size the iframe properly. I set it to 80px, yet it's much wider than that, and it's falling off of the div. Here is the CSS page.

    Also, I was wondering how I can open multiple pages with one link with multiple targets (For example, that iframe as well as the main browser window)

    Any help would be highly appreciate it. I would be nothing short of grateful.
     
  2. FuzzyOne

    FuzzyOne

    Joined:
    19 Sep 2002
    Posts:
    1,839
    Likes Received:
    37
    Code:
    style="width: 80px"
    Is there a reason your using iFrames?, if you give us a run down of what you want to achieve there may be better solutions.
     
  3. TheMusician

    TheMusician Audio/Tech Enthusiast/Historian

    Joined:
    13 Jul 2009
    Posts:
    573
    Likes Received:
    32
    Okie doke. I want to be able to display another page in a little window/box in the right-side bar.

    These little pages will contain simple text. I want it all to fit into the little window.
     
    Last edited: 7 Oct 2009
  4. Shuriken

    Shuriken same christmas AV for a whole year

    Joined:
    1 Jan 2003
    Posts:
    1,312
    Likes Received:
    22
    Hey dude, you got the syntax wrong, you either need to do:

    PHP:
     <iframe name="LandmarkBox" src="Page.html" width="80px" border="0" ></iframe>
    Or: (and this is the prefered method)
    PHP:
     <iframe name="LandmarkBox" src="Page.html" style="width:80px" border="0" ></iframe>
    The first method is depreciated now, especially as you've defined the document as XHTML, so use the second. Also you have to specify units (px)

    Hope that helps
     
    TheMusician likes this.
  5. TheMusician

    TheMusician Audio/Tech Enthusiast/Historian

    Joined:
    13 Jul 2009
    Posts:
    573
    Likes Received:
    32
    Thank you so much! It worked.
     

Share This Page