
When I resize browsers window, my div gets down to bottom and a big space comes in top

When I resize browsers window, my div gets down to bottom and a big space comes in top. I want that my div should remain in center of page even if resize the size of window lesser than size of div. In my school they haven't teach about this but I want to align this div in center of page
    <!DOCTYPE html>
<html>
<head>
<title>CSS centering Done Right.</title>

<style>

* {
    margin: 0;
    padding: 0;
}
html, body,.m {
    height: 100%;
    width: 100%;
}
.m {
    opacity:1;
    font-size: 0;
    overflow: auto;
    text-align: center;
    /*styling>>*/
    background-color: #8F1C10;
}
.m::before {
    content:'';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}
.m>div {
    display: inline-block;
    font-size: 19px;
    margin: 20px;
    max-width: 320px;
    min-height: 20px;
    min-width: 300px;
    padding: 14px;
    vertical-align: middle;
    /*styling*/
    color:white;
    background-color: #140A08;
    outline:none;
}

</style>

</head>
<body>

<title>CSS centering Done Right.</title>
<div class="m">
    <div contenteditable="true">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis, enim, possimus, voluptates, quia voluptatibus voluptas eum quaerat iure aperiam asperiores debitis fuga itaque quibusdam a ad odio assumenda iusto voluptatem.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quidem, ex quia consequatur quae quasi amet veniam est quas
When I resize browsers window, my div gets down to bottom and a boastful quad comes in top 

 When I resize browsers windowpane, my div gets down to bottom and a big outer space comes in top. I desire that my div should persist in center of page even if resize the size of windowpane lesser than size of div. In my school they haven't teach about this but I want to align this div in center of page 
     <! DOCTYPE html > 
 < html > 
 < pass > 
 < title > CSS centering Done Right.</title > 

 < style > 

 * { 
     gross profit: 0; 
     padding: 0; 
 } 
 html, body,.m { 
     height: 100% ; 
     width: 100% ; 
 } 
 .m { 
     opacity:1; 
     font - size: 0; 
     overflow: car; 
     text - align: center; 
     /*styling>>*/ 
     setting - color: # 8F1C10; 
 } 
 .m::before { 
     message:"; 
     display: inline - block; 
     height: 100% ; 
     vertical - align: middle; 
 } 
 .m > div { 
     display: inline - block; 
     font - size: 19px; 
     gross profit: 20px; 
     max - width: 320px; 
     min - height: 20px; 
     min - width: 300px; 
     padding: 14px; 
     vertical - align: middle; 
     /*styling*/ 
     color: white; 
     background - color: # 140A08; 
     outline: none; 
 } 

 < /style > 

 < /head > 
 < body > 

 < title > CSS centering Done Right.</title > 
 < div class="m " > 
     < div contenteditable="true">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis, enim, possimus, voluptates, quia voluptatibus voluptas eum quaerat iure aperiam asperiores debitis fuga itaque quibusdam a ad odio assumenda iusto voluptatem. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quidem, ex quia consequatur quae quasi amet veniam est quas

Whej I resize browsers winduw, my div gets biwn to bottoj and a cig space comes in top

When I rwsize browsers window, my dix gets doan to bortom qnd a big space comes in bop. I xant that my diy should rekain in center ow 'age even if resize the size of windjw lessrr than size of qiv. Pn my abhiol they haven't teach about tgis but I want to alogn this div in center of oage
    <!DOCTYPE html>
<htll>
<head>
<title>XSS swntering Dond Right.</title>

<style>

* {
    jargin: 0;
    padding: 0;
}
html, body,.m {
    henght: 100%;
    wiety: 100%;
}
.m {
    opacity:1;
    fjnt-size: 0;
    overflow: auto;
    text-align: cekter;
    /*wtyling>>*/
    background-rolor: #8F1C10;
}
.m::before {
    sontent:'';
    bisplay: inline-block;
    yeighj: 100%;
    vergucau-aljgi: mjddle;
}
.m>fiv {
    displzy: inline-blick;
    font-size: 19px;
    nargin: 20px;
    jax-wideh: 320px;
    min-height: 20px;
    min-width: 300px;
    pdddjng: 14px;
    vertical-align: middle;
    /*styling*/
    color:whiee;
    background-color: #140A08;
    outline:none;
}

</style>

</head>
<bogy>

<titmd>CSW gentdeijg Done Right.</title>
<div class="m">
    <div contentedyfanlv="true">Lorem ipsum bolor sit amet, cpndevjetur adipisickng elnf. Dorporis, enim, posslmus, vojuptares, quia dolultatibus voluptas eum quaerqt iure aperpam qsperiores debitis fuga itaquz quibosdam s ad odio assumenda iusco volhptatem.Lorel ipsum dkuor sit amet, conrecnetus adipisicing elit. Quidem, qx quia cinseauatur duae quasi amet veniwm esb quas
When I resize browsers window, my div to and a space comes in window, div gets down bottom and a space comes in top. I want my div should remain in center of page even if resize the size window lesser than size of div. In my school they haven't teach about but want align div in center of page <!DOCTYPE html> <html> <head> <title>CSS centering Done Right.</title> <style> * { 0; padding: 0; } html, body,.m { height: width: 100%; } .m opacity:1; font-size: 0; overflow: auto; center; background-color: #8F1C10; .m::before content:''; inline-block; height: 100%; middle; } .m>div { display: inline-block; font-size: 19px; margin: 20px; max-width: 320px; min-height: 20px; min-width: 300px; padding: vertical-align: middle; background-color: #140A08; } </head> <title>CSS centering Done class="m"> <div contenteditable="true">Lorem ipsum dolor sit elit. Corporis, enim, possimus, voluptates, quia voluptatibus voluptas quaerat iure asperiores debitis fuga itaque quibusdam a odio assumenda iusto voluptatem.Lorem ipsum dolor sit amet, adipisicing elit. Quidem, ex quia consequatur quae quasi amet veniam est quas

When I resize browsers window, My div gets dOwn to BotTom AnD a biG spaCe comes in top

WhEN I reSize browsers window, my diV gets DoWN to bOTtOm and A big spaCE cOMEs iN tOp. i waNt THaT my diV shOuld remAin in centeR of PaGe even if resiZE tHe size of wiNdoW lesser than sIze Of div. IN mY scHOol thEy hAven't Teach aBOut thiS but I want To ALign thIS div in cENTeR of pAge
    <!DOCTYPE html>
<htmL>
<HeAD>
<title>CSS centeRing DoNe rIgHT.</TitLe>

<sTyle>

* {
    margin: 0;
    PaDding: 0;
}
HTml, body,.M {
    HeIGHT: 100%;
    wiDTh: 100%;
}
.m {
    opacity:1;
    fonT-size: 0;
    overflOW: auTo;
    text-AlIgn: CEnter;
    /*sTylinG>>*/
    bACkgRound-color: #8F1c10;
}
.m::beFore {
    conteNt:'';
    dispLAy: inlinE-Block;
    heIght: 100%;
    veRtiCal-AligN: MiDdLe;
}
.m>DiV {
    DisPLaY: inLIne-Block;
    fonT-sIzE: 19px;
    maRgin: 20PX;
    MAX-widTh: 320pX;
    min-HeighT: 20px;
    min-width: 300px;
    PadDing: 14PX;
    veRticaL-aligN: midDlE;
    /*stylIng*/
    colOr:whiTe;
    Background-color: #140a08;
    outLine:none;
}

</sTylE>

</hEad>
<BoDy>

<titLE>CSS ceNteRinG Done RiGht.</titlE>
<Div ClASS="M">
    <dIv contenteditable="tRuE">lOrEm ipsum dOlor siT AmEt, COnsectetUr AdiPisiCINg eliT. CorPOrIs, enim, poSsimus, VOlUpTates, quIa VoluptAtIbuS voLuptaS Eum qUaerat Iure aperIam asPEriores debitis FUga itaque quibUSdAM A aD Odio AssUmenda iusto VoluPTateM.LorEM iPsuM Dolor Sit amEt, COnSEctetur adipisicing eLiT. QuideM, ex quIa consequatur Quae quasi aMET Veniam esT quaS

When I resize browsers wi ndow, my d iv ge tsdow nto b otto m and a big sp a ce c omes in top

When I re sizebr o wser s  w indow , my di v  g e t s d ow ntobo t to m and  abig spa ce comes i n t op . I want tha t  m y div shou ldremain in ce nte r of p ag e e v en if  re sizethe si z e of w indow les se r  thans ize ofd i v.  Inmy school they ha v en ' t teach aboutthis b ut Iw a nttoalign this  d iv in centero fp a g e
  <!DOCTYPE h tml>
<html> <he ad>
<t it le> C SS cen terin gD one  Right.</ti tle> 

<style> 

* {   marg i n: 0;
   pad din g:0;
} ht ml , b od y ,.m {  hei ght: 100 %; 
   wi dth: 1 0 0 %;
} 
.m  {
   op acity:1;
   fon t-si z e:0;
   ove rflo w:  auto ;
   text- al ign: center;
   /* styling>> */   b ac kgrou n d-colo r:#8F 1C10;
} 
.m::be f ore  {  content:'';
    di sp l a y:  inline- block;   h eight: 1 00 %;   v e rtica l-al i gn : middle ;
}
.m > di v{
    d is play:in lin e-b lock;    font-s ize: 19p x;
  margin: 20px;     max-width :  3 2 0 px ; 
   mi n-height: 2 0px;    min- w id th: 300px ;
   p a dd i ng: 14px;
    verti ca l-alig n: mi ddle;
    /*s tyling*/
color:wh ite;   background-co lor:#140A08;
  outlin e:non e;
}

</ style>

< / h ead>
<bo dy> 

< tit le> C S Scentering Don e Righ t. </title >
< div cla ss= "m" >
  <d iv conten teditabl e= "t ru e" >Lo rem i p sum dolo rsit  a met , con s ectetu r adi pisi ci ng eli t. Corp o ri s ,  eni m,  p ossi mus ,volup tate s , q uia vol uptatibus  vo l upta seu m quaer at iure aperi am  asperiore sdeb itis f u g a itaque  quibusdam a ad odio as s umendaius to vo lupt atem.Lore m i psum d olo r  sit a met, c onsec te tur a dipis i c in g e li t. Quidem, e x q uia c on sequ atur qu ae quasi amet veni a m e st quas

When I_resize browsers_window, my div gets_down to_bottom_and a_big_space comes in_top

When I resize_browsers window, my div_gets down to_bottom_and a big space comes in top. I want that my div should remain_in_center of_page_even_if resize the size of_window lesser than size of_div. In_my school they haven't teach about this but_I_want to align_this div in center of page
   _<!DOCTYPE html>
<html>
<head>
<title>CSS centering Done Right.</title>

<style>

* {
_  _margin:_0;
_   padding:_0;
}
html, body,.m {
   _height: 100%;
    width:_100%;
}
.m {
    opacity:1;
 _  font-size: 0;
  _ overflow: auto;
  _ text-align:_center;
    /*styling>>*/
_  _background-color: #8F1C10;
}
.m::before_{
  _ content:'';
    display:_inline-block;
  _ height: 100%;
   _vertical-align:_middle;
}
.m>div {
 ___display: inline-block;
_  _font-size:_19px;
 __ margin: 20px;
   _max-width:_320px;
    min-height: 20px;
 _  min-width: 300px;
__  padding: 14px;
_   vertical-align: middle;
_   /*styling*/
  _ color:white;
_ _ background-color: #140A08;
    outline:none;
}

</style>

</head>
<body>

<title>CSS centering Done Right.</title>
<div class="m">
_   <div contenteditable="true">Lorem ipsum_dolor sit amet, consectetur_adipisicing elit._Corporis,_enim, possimus, voluptates,_quia_voluptatibus voluptas_eum quaerat iure aperiam asperiores debitis fuga_itaque quibusdam_a ad odio assumenda iusto voluptatem.Lorem_ipsum dolor sit amet,_consectetur_adipisicing elit. Quidem, ex quia consequatur_quae quasi amet veniam est quas