View Full Version : 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?
I don't understand what you mean by "requiring" frameborder; do you mean in a CSS sense? Or a validation sense.
07-06-2007, 08:24 AM
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.
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?
07-06-2007, 06:51 PM
Creating separate pages and using server side includes would be the alternative. What is your reason for using an iframe?
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 :( )
07-06-2007, 07:27 PM
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.
// do something
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.