html - Change CSS property value using signed values -
i having html content this.
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
Post a Comment