Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to place an element in the center(horizontally & vertically) of another elment even on resizing window
Posted
Comments
Richard C Bishop 25-Sep-13 10:16am    
I believe you need to set your margin to auto and possibly text-align:center in your parent element.

1 solution

It depends on the element. Here are some good explanations of different methods:

6 Methods For Vertical Centering With CSS (http://www.vanseodesign.com/css/vertical-centering/[^])

CSS: centering things (http://www.w3.org/Style/Examples/007/center.en.html[^])
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900