Such details are driving me crazy while creating GUIs with Mathematica:
Panel[
Panel["", Background -> Yellow, ImageMargins -> 0, ImageSize -> {26, 26}]
, Background -> Black, Alignment -> Center]

Margins above are symmetric in vertical and horizontal direction, let's say I want to take control and specify FrameMargins:
Panel[
Panel["", Background -> Yellow, ImageMargins -> 0, ImageSize -> {26, 26}]
, Background -> Black, Alignment -> Center, FrameMargins -> {{1, 1}, {1, 1}}]

Now clearly they are not. I used 1 because then it is easily seen but the value does not matter.
Am I missing something?
Edit
With Framed it seems to be ok, but one have to add FrameStyle->None.
Panelwith custom bg, it can be approximated withGraphics. Would this solve the problem?Graphics[{Black, Rectangle[{0, 0}, {26, 26}], Yellow, Rectangle[{0, 0} + 3, {26, 26} - 3]}, ImageSize -> 26, ImageMargins -> 0, ImagePadding -> 0](related) – István Zachar Jan 13 '14 at 09:53PanelI didn't have to. – Kuba Jan 13 '14 at 10:45FrameMarginsversion, when I evaluated it in V.9.0.1 on OS X 10.6.8 – m_goldberg Jan 13 '14 at 14:24