html class 선언 코드 질문
조회수 282회
html 막 시작한 코딩 초보입니다. class 선언하고, 검색창(input)란에 image를 씌우려고 class를 선언했는데, 적용이 안됩니다. 엉뚱한 코드에만 적용이 됩니다 ㅠㅠ 무엇이 문제일까요??
<head>
<style type="text/css">
.search {
position: relative;
width: 300px; }
input {
width: 100%;
border: 1px solid #bbb;
border-radius: 8px;
padding: 10px 12px;
font-size: 14px; }
img {
position : absolute;
width: 17px;
top: 10px;
left: 120px;
margin: 0; }
</style>
<img src = "wikipidia-main.jpg" style = "width: 20em; height: 5em;" alt = "위키백과">
<div class="search">
<input type="text" placeholder="검색어 입력">
<img src="search_top_en_US.gif">
</div>
</head>
댓글 입력