asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Element Attributes > COLS Attribute

COLS Attribute | cols Property


Specifies a comma-delimited string of frame widths.

Syntax

Inline <FRAMESET COLS = "iWidth [ % | * ] [ , iWidth [ % | * ] ... ] " ... >
Script frameset.cols = "iWidth [ % | * ] [ , iWidth [ % | * ] ... ] " ]

Possible Values

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.

Remarks

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.

Example

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">
Applies To

FRAMESET

See Also

rows, Authoring Your Pages: Frames and Framesets



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note