Hi likiriki,
You have specific reason for the above css “recipe” not working for you.
On your second link (mail share), the box display is not ruled only by css code but is define in the HTML code as shown bellow
(showing only the part connected to the problem, style defined by HTML is in bold ):
……………………….
<div id="TB_window" class="TB_ajaxContent TB_titleTop" <strong>style="margin-left: -266px; margin-top: -219px; display: block; width: 530px;"</strong>>.....(showing only the part connected to the problem)</div></div></div>
………………………..
HTML style is what gets loaded if define, regardless of CSS code, so in this case, for this particular pop-up box, position is actually corrected by HTML.
So you need a bit different “recipe” for the pop-up box that doesn’t show in the centre (newsleter, your first link)i.e. you will need to
add a line in bold, as shown bellow:
……………………………….
#TB_window {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #555555;
box-shadow: 0 4px 30px #000000;
color: #000000;
display: none;
left: 50%;
position: fixed;
text-align: left;
top: 50%;
z-index: 10102 !important;
margin-left: -300px;
}
…………………………….
This will center pop-up box horizontally:
————–xxxxx—————
It’s ok IMO.
However, if you would like to center it vertically too, you will need
to add one more line:
………………
margin-top: -120px;
………………
Hope this helps ??