/ Published in: CSS
                    
                                        Center X and Y of fixed element, you must know the width and height
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 position:relative; height:600px; top: 50%; margin-top: -300px; /* minus half the height */ left:50%; margin-left:-300px /* minus half the width */ width:600px;
Comments
                    Subscribe to comments
                
                