CSS Margin/Border Ordering
So help me God I hope I never forget this again, but no doubt its gone out of my head by monday. This is one of the things that I have to look up every six months or so when I need to muck around with CSS.
The order of the margin property works like this (copied straight from w3schools):
h1 {margin: 10px}
all four margins will be 10pxh1 {margin: 10px 2%}
top and bottom margin will be 10px, left and right margin will be 2% of the total width of the document.h1 {margin: 10px 2% -10px}
top margin will be 10px, left and right margin will be 2% of the total width of the document, bottom margin will be -10pxh1 {margin: 10px 2% -10px auto}
top margin will be 10px, right margin will be 2% of the total width of the document, bottom margin will be -10px, left margin will be set by the browser
Comments(0)