상세 컨텐츠

본문 제목

네비게이션바 메뉴 가운데 정렬

스터디(코딩, 잡지식 등)

by 촘스키 2018. 12. 10. 20:41

본문

반응형


<!DOCTYPE html>

<html>

<head>

<style>

.nav {

  background-color: yellow; 

  list-style-type: none;

  text-align: center;

  margin: 0;

  padding: 0;

}


.nav li {

  display: inline-block;

  font-size: 20px;

  padding: 20px;

}

</style>

</head>

<body>


<h1>Horizontal Navigation Links</h1>

<p>By default, list items are displayed vertically. In this example we use display: inline-block to display them horizontally (side by side).</p>

<p>Note: If you resize the browser window, the links will automatically break when it becomes too crowded.</p>


<ul class="nav">

  <li><a href="#home">Home</a></li>

  <li><a href="#about">About Us</a></li>

  <li><a href="#clients">Our Clients</a></li>  

  <li><a href="#contact">Contact Us</a></li>

</ul>


</body>

</html>

반응형

관련글 더보기

댓글 영역