html - How can I position this DIV in exactly the middle and it isn't moved while resizing the browser? -


you'll need this, in advance. how can text inside div positioned in middle?

body {    margin: 0;  }  #questiond {    width: 1080px;    height: 675px;    background-color: white;    position: relative;    margin: auto;  }  #frage1 {    position: absolute;    left: auto;    font-family: 'roboto', sans-serif;    color: #f09b72  }
<body background="img/bg.jpg">    <div id="questiond">      <h1 id="frage1">frage 1</h1>    </div>  </body>

hello hope looking 1 below

#questiond {      position: absolute;      top: 50%;      left: 50%;      margin-left:auto;      margin-right:auto;      width:960px;
<div id="questiond">      <h1 id="frage1">frage 1</h1>    </div>


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -