magnumdirectory
asked on
Centering a divider in middle of page?
How do you center a divider in the middle of a page both vertically and horizontally so it's exactly in the middle of a browser?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Assume that the following is the divider:
<img src="divider.gif" style="width: 200px; margin-left:auto; margin-right:auto;" />
width is the width of your image and divider.gif is the path of the image on the server.
<img src="divider.gif" style="width: 200px; margin-left:auto; margin-right:auto;" />
width is the width of your image and divider.gif is the path of the image on the server.
use
var wide = window.screen.availWidth
var high = window.screen.availHeight