I need to place a dialog(with position:fixed to keep it fixed while scrolling page) exactly on top of another div in page body. I have centered layout on my page so I cannot figure out how can I set the left property in CSS for the dialog. For the top property I know the value as this dialog is kept below nav bar
I need to place a dialog(with position:fixed to keep it fixed while scrolling page)
Share
nice question.
it has 2 answers :
1) use javascript to determine the sizes…
2) without js – its a pure html trick :
http://css-tricks.com/320-quick-css-trick-how-to-center-an-object-exactly-in-the-center/