CSS Dikeyde Ortala

<html>

<head>

 

<style>

#dikeyort{

    display: table; 

    height: 400px; 

    #position: relative; 

    overflow: hidden;

    border: 1px solid green;

}

#yazialani{

    #position: absolute;

    #top: 50%; 

    display: table-cell; 

    vertical-align: middle;

}

#alan{

    #position: relative; 

    #top: -50%;

    border: 1px solid green;

}

</style>

</head>

<body>

  <div id=”dikeyort”>

    <div id=”yaziAlani”>

    <div id=”alan”>Dikey ortalanmış yazı </div>

    </div>

  </div>

</body>

</html>

Bana Ders Anlat © 2008-2022