Tuesday, January 8, 2013

Centering a pop-up window...




#PopUpFad {
	background: #f2f2f2;
        text-align: center;
	font-family: Arial,sans-serif;
	padding: 10px;
	border: 4px solid #000;
        top: 250px;
	position: absolute;
	margin: 0 auto;
	display: none;
	opacity: 0;
	KHTMLOpacity: 0;
	filter: alpha(opacity=0); 
	-moz-opacity: 0;
	z-index: 1000;	
}

#PopUpFad a {
	text-decoration: none;
	border: none;
	font-size: 9px;
	color: #333;
}

#PopUpFad img {
	border: none;
}

#PopUpFad .PopUpFadClose {
	position: absolute;
	top: 5px;
	right: 5px;
}

#PopUpFad.show {
	display: block;
}


I have tried several things with #PopUpFad...

1. I can adjust the vertical postion by changing "top: 250px;", however if I add a "left:" or "right:" it does not affect the horizontal position.
2. I have changed "position:absolute;" to fixed, relative, static...nothing.
3. I saw a suggestion to try "display:inline-block;"...nothing.

0 comments:

Post a Comment