Frameset cols Property
Frameset Object
Definition and Usage
The cols property sets or returns the value of the cols attribute in a frameset.
The cols attribute specifies the size of, and the number of frames in a
frameset. Each frame’s width is specified in a comma-separated list.
Syntax
|
framesetObject.cols=values |
The cols property can have one or more of the following values:
| Value |
Description |
| pixels |
The column size in pixels (like "100px" or just "100") |
| % |
The column size in percent of the available space (like "50%") |
| * |
The rest of the available space should be assigned this column |
Browser Support

The cols property is supported in all major browsers.
Example
Create a frameset
with two columns. Each column is set to 50% of the browser window:
<html>
<frameset id="main" cols="50%,50%">
<frame src="frame_cols.htm" />
<frame src="frame_a.htm" />
</frameset>
</html> |
The source code of "frame_cols.htm" is as follows:
Example
<html>
<head>
<script type="text/javascript">
function changeCols()
{
parent.document.getElementById("main").cols="30%,70%"
}
function restoreCols()
{
parent.document.getElementById("main").cols="50%,50%"
}
</script>
</head>
<body>
<input type="button" onclick="changeCols()"
value="Change column size" />
<input type="button" onclick="restoreCols()"
value="Restore column size" />
</body>
</html>
|
Try it yourself »
|
Frameset Object

Whether you're new to XML or already an advanced user, the user-friendly views and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to meet your XML and Web development needs from start to finish.
New features in Version 2010!
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- XBRL validator, taxonomy editor, taxonomy wizard
- Support for Office Open XML (OOXML)
- Graphical WSDL 1.1/2.0 editor & SOAP debugger
- JSON editing & conversion
- Java, C#, C++ code generation
- 32-bit and 64-bit versions
- And much more!
Download a free trial today!
|
|
|
|