Home > Abakada: Back to Basics > Language References > HTML Element Attributes > COLS Attribute
Specifies a comma-delimited string of frame widths.
Inline |
<FRAMESET COLS = "iWidth [ % | * ] [ , iWidth [ % | * ] ... ] " ... > |
Script |
frameset.cols = "iWidth [ % | * ] [ , iWidth [ % | * ] ... ] " ] |
iWidth |
Integer specifying the frame width in pixels. |
iWidth% |
Integer specifying the frame width as a percentage of total available width. |
iWidth* |
Integer specifying the frame width as a relative value. After allocating pixel or percentage values, the remaining space is divided among all relative-sized frames. |
The property is read/write with no default value.
The number of comma-separated items is equal to the number of frames contained within the FRAMESET, while the value of each item determines the frame width.
The following example defines a two-column frame, with the first occupying 40 percent of the available width and the second occupying the remaining 60 percent.
<frameset COLS="40%, 60%">
The next example defines a four-column frame. The first is 50 pixels wide, and the fourth is 80 pixels wide. The second will occupy two-thirds of the remaining width, while the third will occupy the final third of the remaining width.
<frameset COLS="50, 2*, *, 80">
FRAMESET
rows, Authoring Your Pages: Frames and Framesets