Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Make page to stay at center of screen

$
0
0
# July 26, 2017 at 8:51 am

Company use 17″ and 23″ monitor. I want app page always stay at the center of screen.

I learn CSS from the link here http://jsfiddle.net/PvfFy/.
I added a div1 and set class as divMain.
It works great.

#divMain {
position: fixed;
/* center the div /
right: 0;
left: 0;
margin-right: auto;
margin-left: auto;
/ give it dimensions */
min-height: 10em;
width: 90%;
height: 80%;
top: 5em;
}

At the page, there are a few controls also, like labels, buttons and gridview.

How to add another CSS to make new div2 (including all controls label, button and gridview) always stay at center of screen ?

For example, from this link

https://www.w3schools.com/css/tryit....ition_absolute

How to make child div stay at center of parent div without using position:absolute?

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>