Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts

    why does an iframe require that the frameborder="0" be used in the xhtml

    Oops,I meant iframe.

    Surely it is presentational mark up and as such, should really go in the CSS.

    or have I missed some unusual css tag for it?

    bazz

  • #2
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    I don't understand what you mean by "requiring" frameborder; do you mean in a CSS sense? Or a validation sense.
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    border:0; would work in Firefox but unfortunately IE has no support for this on iframes which is why frameborder="0" is still needed. IMO you shouldn't be using iframes in the first place.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Thanks _Aerospace_Eng_.

    That's exactly what I found and so I have border:0 in the css and now, frameborder="0" in the html.

    whats your alternative suggestion for the iframe?

    bazz

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Creating separate pages and using server side includes would be the alternative. What is your reason for using an iframe?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    its my own cms system where the main file contains the session data and is the login script. The files in the iframe are then only accessible if the user has logged in and so, they cannot be looked at as stand-alone files. (subject to someone craking into it that is )

    bazz

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Still no need for the iframe. A server side language like PHP can detect when a user navigates to a file directly. You can then do what you wish with the page. This is what I use on my site for my php includes at the very top of them.
    PHP Code:
    <?php
    if(eregi(basename(__FILE__),$_SERVER['REQUEST_URI']))
    {
    // do something
    }
    ?>
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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