#1
  1. The Basketball Star
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2001
    Location
    H-Town
    Posts
    550
    Rep Power
    13

    Positioning in CSS


    Recently I have begun to use CSS to do basically everything to do with positioning and aesthetics. Trying to move into the XHTML standard. Anyway, I used CSS to position pictures and text on a page of mine and it works perfectly in IE 6.0, NS6, and Mozilla 1.2. But then I had an <iframe> that I'm inserting in the center of the page. Now the <iframe> appears in all browsers, but is only centered in IE. Here's the code I used:
    PHP Code:
    CSS:

    div.frame positionabsolutetop19pxleft144px };

    HTML:

    <
    div class="frame"><iframe src="home.html" name="page" width="707" height="425" frameborder="0"></iframe></div
    Like I said, that only works in IE 6.0. I'm wondering why it doesn't work for the other two. I'd understand if positioning altogether didn't work for the other two, but it seems to only not work for the <iframe>. I was forced to create an entirely new page for the other two browsers so it'd look good. Here's what I did:
    PHP Code:
    <table width="980">
        <
    tr>
            <
    td colspan="2"><img src="pixel.gif" width="0" height="12" alt="Pixel" /></td>
        </
    tr>
        <
    tr valign="top">
            <
    td width="116">&nbsp;</td>
            <
    td width="707"><iframe src="home.html" name="page" width="707" height="425" frameborder="0"></iframe></td>
        </
    tr>
    </
    table
    Here's Page #1 and Page #2.

    Thanks for all the help!
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Try putting the style directly on the iframe. That might make a difference.

    Also, I don't have IE to test with, but in mozilla & phoenix I can't scroll the iframe or highlight the contents. Both page work peachy in Konqueror, though.
    -james
  4. #3
  5. The Basketball Star
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2001
    Location
    H-Town
    Posts
    550
    Rep Power
    13
    I didn't think it would make a difference, but it did. Putting it directly in the <div> tag using "style" made it work. I don't see why it would make a difference. But anyway it works now in all three browsers with only one page so that's good.

    You should be able to scroll now. It was working before, but I think I forgot to upload the latest working version.
  6. #4
  7. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Ya, scrolling works on index6.html. Doesn't work on index6a.html, though. No idea why .
    -james

IMN logo majestic logo threadwatch logo seochat tools logo