html - Change CSS property value using signed values -


i having html content this.

the box model

it has padding of 70. tried reduce padding adding using css rule this

padding-top: -20px !important

all want is, existing property value 70px should added additional rule -20px result should 50px.

i able accomplish doing padding-top: 50px !important

but still want mathematical calculations in css asked. please help.

note: existing value in separate css rule , added 1 in separate rule.

unfortunately, can't cross class calculations in css

if want mathematical calculations of kind, check out calc() function

it allows things like: padding-top: calc(10em - 60px)

as long you're not using background-position; calc should backwards compatible ie9 , work on pretty other browser bar opera mini


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -