Results 1 to 7 of 7

Thread: CSS + iFrame?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Posts
    28

    CSS + iFrame?

    Code:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <STYLE type="text/css">
          BODY { height: 8.5in }
    
          #header {
            position: fixed;
            width: 100%;
            height: 15%;
            top: 0;
            right: 0;
            bottom: auto;
            left: 0;
    	border: 0;
          }
    </STYLE>
    </HEAD>
    <BODY>
    
    <DIV id="header">
    <IFRAME SRC=http://www.google.com>
    </DIV>
    
    </BODY>
    </HTML>
    The code seems pretty simple, I just want to apply the defined CSS format to an iFrame, but for some reason it doesn't work. Any ideas why?

    Thank

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    try using it this way


    <iframe src="dfsgfdg" CLASS="YourClass">

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Posts
    28
    Still didn't work, thanks though

  4. #4
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    Where are u trying to apply the class - on google's page?

    If that is the case- that wont be possible,but if you want to change the style of your iframe then it would work.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Posts
    28

    hi

    I want to apply absolute positioning to the iframe, not to googles page.

    Thanks

  6. #6
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    Shd have mentioned it.
    before try this:
    Code:
    <div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 283px; top: 260px">
    <iframe src="http://www.google.com" rows="5" cols="40"></iframe>
    </div>

  7. #7
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    iFrames are the most demented things in the world... If memory serves me CSS doesn't like iFrames but I could be wrong.. I had no end of troubles trying to get it to work.. In the end I used some ASP to get the damn thing to work I think...

    May I ask why you are using an iFrame?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width