Frames Without FrontiersIf you'd like to have a frame-based site with no borders, you can get rid of them. If you're following the rules, authoring borderless frames is easy. You simply add the attribute and value frameborder="0" within the frame tag (see Example 6-11). Example 6-11. Working with borderless frames<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Borderless Frames</title>
</head>
<frameset cols="200,*">
<frame frameborder="0" src="menu.html" name="menu" marginheight="5" marginwidth="5"
You can see the borderless results in Figure 6-8. Figure 6-8. Look ma, no borders!
Of course, this works only in modern browsers because originally Netscape and Internet Explorer introduced their own, proprietary means of getting rid of frame borders. Netscape browsers earlier than 6.0 allow for borderless frames in these circumstances: Older versions of Internet Explorer produce borderless frames under these conditions:
will be read by both browsers without difficulty. This technique results in two syntax options: <frameset frameborder="0" framespacing="0" border="0"> or <frameset frameborder="no" framespacing="0" border="0"> Example 6-12 shows how our example so far might look with the invalid syntax. Example 6-12. Supporting borderless frames in older browsers<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Borderless Frames</title> </head> <frameset frameborder="0" framespacing="0" border="0" cols="200,*"> <frame src="menu.html" marginheight="5" marginwidth="5" noresize= "noresize" NOTE browsers are becoming far less common, so support for them is becoming less necessary. |
| |||||||||||||||||||