SitePoint Sponsor

User Tag List

Results 1 to 15 of 15

Thread: iframes and css

  1. #1
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iframes and css

    Tell me what you know about this. I have a fixed height design (such is the design itself), so I am limited in that I cannot put alot of content in my little box.... I thought about doing an iframe. First off, how styleable is an iframe? second of all is it possible to do an iframe so no scrollbar appears unless absolutely necesssary? How crossbrowser is the styling of scrollbars?

    Thanks.

    Aaron
    Aaron Brazell
    Technosailor



  2. #2
    SitePoint Addict
    Join Date
    Mar 2002
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To get an iFrame not to scroll use:-

    <iframe src="text.txt" scrolling="no"></iframe>

    If set ot yes, scrollbars will only appear when content gets to large. By the way, did you know you can do this:-

    <iframe src="c:\windows"></iframe>

    See the Deskbro page on my site below for more on this. iFrames are not very styleable and react differently in different browsers (the example above only works in IE). Hope this helps.

    Nick
    All4YourPC for all your PC needs. Custom software.
    Websites. Web marketing. Training.
    http://members.aol.com/nickjc67

  3. #3
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I knew that about iframes. I also don't use IE so I'm not going to try it out. Thanks though.
    Aaron Brazell
    Technosailor



  4. #4
    SitePoint Zealot Run2Web's Avatar
    Join Date
    Apr 2002
    Location
    Indiana
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nickc
    To get an iFrame not to scroll use:-

    <iframe src="text.txt" scrolling="no"></iframe>

    If set ot yes, scrollbars will only appear when content gets to large. By the way, did you know you can do this:-

    <iframe src="c:windows"></iframe>
    Nick
    Can't you also use <iframe src="text.txt" scrolling="auto"></iframe>?
    RUN2Web

    Has Anyone seen my Furry Little Mind?

  5. #5
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess my biggest question is, can I put an iframe in a div and have it transparent so the page background shows through?
    Aaron Brazell
    Technosailor



  6. #6
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Why not just use an actual <div> and use PHP includes (if you're using PHP) to bring in your content?

    CSS:
    Code:
    div#contentstuff {
      background: transparent;
      height: 400px;
      overflow: scroll;
    }
    PHP:
    PHP Code:
    <div id="contentstuff">
    <?php include(variableWithPageContent);?>
    </div>
    Far more accessible than iframes in my opinion

  7. #7
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I'm doing that, but what if the content is too much for my content area. Ok, I wasn't going to refer to the site, but this is for my own site, www.emmense.com. Specifically, I want to put some of my articles in there without having to break the article up. As you can see, the content area is limited. It will be spilling out into the surrounding non-content areas. So I want to use iframe so I can keep it all in the content area....see where I'm going now?

    Aaron
    Aaron Brazell
    Technosailor



  8. #8
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    The <div> I posted will keep to its box if your content fits in it, but will add a scrollbar if the content gets too big (that's the purpose of the "overflow: scroll;" property). With just my code you should be fine, try it out and see if it works for you (it should; I've used this before too ).

  9. #9
    SitePoint Wizard silver trophy Crazybanana's Avatar
    Join Date
    Mar 2003
    Location
    In tha fruit cellar
    Posts
    1,379
    Mentioned
    32 Post(s)
    Tagged
    1 Thread(s)
    i use same as vinnie shows here and it works like a dream. i had the same problem with limited content area before i picket up this one.
    Who's to doom when the judge himself is dragged before the bar


  10. #10
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh ok, gotcha. I made the mistake of reading the email which doesn't include the php and code tags.

    Thanks, I'll give it a try.

    Aaron
    Aaron Brazell
    Technosailor



  11. #11
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Sketch
    oh ok, gotcha. I made the mistake of reading the email which doesn't include the php and code tags.
    Off Topic:

    Time to give the edit button a whirl?

  12. #12
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why start now?
    Aaron Brazell
    Technosailor



  13. #13
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmmm.

    I add the overflow:Scroll and now I have scrollbars (both h and v) when I don't need them.... not cool.

    Aaron
    Aaron Brazell
    Technosailor



  14. #14
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind...auto instead of scroll fixes it.
    Aaron Brazell
    Technosailor



  15. #15
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Glad you got it working!


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
  •