Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

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?
0
magnumdirectory
Asked:
magnumdirectory
1 Solution
 
David S.Commented:
There are a few ways to do that. Each has its pros and cons.

http://www.dynamicsitesolutions.com/css/center-page-content-horizontally-and-vertically/


0
 
SreejithGCommented:
get the window size and find the middle and set the divider.

use
  var wide = window.screen.availWidth
  var high = window.screen.availHeight
0
 
shadow_shooterCommented:
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.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now