Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to write a text inside a div

<html>

<head>
  <style type="text/css">
    div {
      height: 100px;
      width: 100px;
      background: #ccc;
      text-align: center;
    }

    p {
      line-height: 100px;
    }

  </style>
</head>

<body>
  <div>
    <p>centered</p>
  </div>
</body>

</html>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #write #text #div
ADD COMMENT
Topic
Name
9+2 =