Jump to content

Turning off frame borders


Jammy_Stuff
 Share

Recommended Posts

My website has a navigation frame on the left, and the page on the right. It is done in XHTML frameset. I used to have an annoying border or the frames. I added the attribute:

frameborder="0"

Now, the annoying border doesn't appear in firefox but it still does in IE. Also, the website fails validation as the attribute doesn't exist. Is there any way that I can get it to validate (preferably also getting it to work in IE).If there isn't a way to get it to work in IE, I'll just add a note that the page works best in Firefox :).

Link to comment
Share on other sites

post your codes for the frameset page you have done, and i might be able too help you. :) But the frameborder="0"/frameborder="no" should work. there for i want an overview how its constructed if you missed something :(edit-------scott100 have a point there(seems like i have to be faster at posting) :)

Link to comment
Share on other sites

Here's the contents of my index.html file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html><head><title>Welcome to James' Site</title><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><frameset cols="20%,80%" frameborder="0"><frame marginwidth="0" noresize="noresize" src="navigation.html" /><frame marginwidth="0" noresize="noresize" src="home.html" name="mainframe" /><noframes><body>Your browser does not support frames. <a href="http://www.mozilla.com/firefox/">Get Firefox!</a></body></noframes></frameset></html>

This works in firefox but in IE there is still a border on the frames. Also, it doesn't validate. I tried that thing about putting frameborder="0" in the frame tag rather than the frameset. That validated, but had borders in every browser. So it was totally pointless.

Link to comment
Share on other sites

Try this, it works ok in IE and FF and validates.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html><head><title>Welcome to James' Site</title><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><frameset cols="20%,80%"><frame marginwidth="0" frameborder="0" noresize="noresize" src="navigation.html" /><frame marginwidth="0" frameborder="0" noresize="noresize" src="home.html" name="mainframe" /><noframes><body>Your browser does not support frames. <a href="http://www.mozilla.com/firefox/">Get Firefox!</a></body></noframes></frameset></html>

Link to comment
Share on other sites

I've tried that and here is the results. It validates, but doesn't seem to have any effect in Firefox or IE.

Yes that's strange, it works though if you put another website in one of the frames :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html><head><title>Welcome to James' Site</title><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><frameset cols="20%,80%"><frame marginwidth="0" frameborder="0" noresize="noresize" src="http://www.yahoo.com" /><frame marginwidth="0" frameborder="0" noresize="noresize" src="home.html" name="mainframe" /></frameset><noframes><body>Your browser does not support frames. <a href="http://www.mozilla.com/firefox/">Get Firefox!</a></body></noframes></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...