본문 바로가기

Programming/HTML

화면 가운데, div 가운데 정렬

alignDiv.html

<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<style>
#bluebox {
	background-color: blue;
  color:white;
	width: 150px;
	height: 150px;
	margin: 0 auto;
  text-align: center;
}
</style>
</head>
<body>
	<div id=bluebox>파란 상자</div>
</body>
</html>