w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

Frameset cols Property


Frameset Object Reference 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

Internet Explorer Firefox Opera Google Chrome Safari

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 Reference Frameset Object

Altova® XMLSpy® - The industry's leading XML editor!

Altova XMLSpy

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!

  Altova XMLSpy


WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap UK Web Hosting
WEB BUILDING
Download XML Editor
FREE Flash Website
FREE Web Templates
SEO Company
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE