Open Direct Page in the Center

1

Is it possible when you open the page load directly in the center of the page without anchor and also without scroll?

Everything I search relates to window.open() . I did not find anything specific that I need.

    
asked by anonymous 19.08.2015 / 17:04

2 answers

1

I solved it as follows:

$(document).scrollTop($(window).height() / 2);

My document will open in the center of the page, making the screen size divided by 2.

Anyway, I flirted.

    
19.08.2015 / 18:04
2

You can target a specific element:

http://www.minhapagina.com/#centro

That is, when entering the main page, simply redirect to the same address by adding # + id of the element!

    
19.08.2015 / 17:15