- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Perform calculations to determine CSS property values
Get the values of properties in CSS using the calc() property. You can try to run the following code to implement the calc() function in CSS
Example
<!DOCTYPE html> <html> <head> <style> #demo { position: absolute; width: calc(100% - 100px); background-color: blue; text-align: center; } </style> </head> <body> <h1>Heading One</h1> <div id = "demo">This is it!</div> </body> </html>
Advertisements