Is there anyway that I can write a css value as mathematical expression?
Example:
div{
height: 50% + 30px;
width: 40em - 5px;
}
If there is, it would be perfect.
PS: I don’t want to do it with JS or JQuery.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can achieve this with css3 calc(). Write like this:
Check this http://jsfiddle.net/3QUw6/
Check this discussion for more Is it possible to make a div 50px less than 100% in CSS3?