html - CSS calc() subtract negative value -


is ok subtract minus number, this?

width: calc(35% - -20px); 

because if above, behaves differently if this:

width: calc(35% + 20px); 

here can see difference: http://nightly.gamempire.it/

  • put window of browser < 1200px , > 1000px
  • analyze #gallery_thumb element

actually see has: calc(35% - -20px) if change calc(35% + 20px), breaks (the #gallery_thumb less higher #gallery_img).

why this? can not subtract negative number?

calc() native css way simple math right in css replacement length value (or pretty number value). has 4 simple math operators: add (+), subtract (-), multiply (*), , divide (/).

more info

link two

link three

calc() function browsers compatibility


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -