McGraw.Hill.How.to.Do.Everything.with.JavaScript.eBook-DDU

Page 251

232

How to Do Everything with JavaScript

Define Frames with Rows and Columns Framesets need not be only horizontal or only vertical. Web developers can create framesets that contain both rows and columns, like a grid. This is done by specifying values for both the rows and cols attributes. For instance, to create a frameset that has three rows and two columns, you would use the following HTML code: <frameset rows="50, 100, *" cols="50%, 50%"> <!-- <frame> tags go here --> <frame src="frame1.html"> <frame src="frame2.html"> <frame src="frame3.html"> <frame src="frame4.html"> <frame src="frame5.html"> <frame src="frame6.html"> </frameset>

The preceding code creates a frameset that contains six frames, arranged into three rows and two columns. Notice that the number of rows and columns does not have to be equal. Figure 10-4 shows how this complex frameset will look in a browser.

FIGURE 10-4

A frameset with both rows and columns


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.