calc

  • Revision slug: CSS/calc
  • Revision title: calc
  • Revision id: 36384
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment new page; very wip; page created, 67 words added

Revision Content

{{ CSSRef() }}

Summary

The calc() CSS function can be used anywhere a {{ Xref_csslength() }} is required. With calc(), you can perform calculations to determine the size and shape of objects.

Syntax

 <a_css_property>:  calc(expression)

Values

expression
A mathematical expression, the result of which is used as the {{ Xref_csslength() }}.

Examples


Browser compatibility

Browser Lowest version
Internet Explorer -
Firefox (Gecko) 4.0 (2.0)
Opera -
Safari (WebKit) -

Specifications

Revision Source

<p>{{ CSSRef() }}</p>
<h3>Summary</h3>
<p>The <code>calc()</code> CSS function can be used anywhere a {{ Xref_csslength() }} is required. With <code>calc()</code>, you can perform calculations to determine the size and shape of objects.</p>
<h3>Syntax</h3>
<pre> &lt;a_css_property&gt;:  calc(<em>expression</em>)
</pre>
<h3>Values</h3>
<dl> <dt>expression</dt> <dd>A mathematical expression, the result of which is used as the {{ Xref_csslength() }}.</dd>
</dl>
<h3>Examples</h3>
<br>
<h3>Browser compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest version</th> </tr> <tr> <td>Internet Explorer</td> <td>-</td> </tr> <tr> <td>Firefox (Gecko)</td> <td>4.0 (2.0)</td> </tr> <tr> <td>Opera</td> <td>-</td> </tr> <tr> <td>Safari (WebKit)</td> <td>-</td> </tr> </tbody>
</table>
<h3>Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/css3-values/#calc" title="http://www.w3.org/TR/css3-values/#calc">CSS 3 Values and units</a></li>
</ul>
Revert to this revision