์๋ ๋ฌธ์ํ๊ธฐ์ ์ด๋ฉ์ผ ๋ถ๋ถ์ ๋ง๋ค์ด๋ณด์
์ด๊ธฐํ์ฝ๋๋ก form ๋์์ธ ์์ ๊ธฐ
์ด๊ธฐํ ์ฝ๋๊ฐ ์ฌ์ฉ๋ ๋ฐฑ์ง์ํ์์ ํผ์์๋ค์ด ์ด๋ ๊ฒ ๋์จ๋ค.
<form>
<fieldset>
<legend>๋ฌธ์์์ฑํ๊ธฐ</legend>
<div class="inquri_wrap">
<table>
<caption>๋ฌธ์ํ๊ธฐํ
์ด๋ธ</caption>
<tr>
<th>์ด๋ฉ์ผ<i class="star"></i></th>
<td>
<input type="text" readonly title="์ด๋ฉ์ผ">
<span>@</span>
<input type="text" readonly title="์ด๋ฉ์ผ">
<select title="๋๋ฉ์ธ์ ํ">
<option>์ง์ ์
๋ ฅ</option>
<option value="naver.com" selected="">naver.com</option>
<option disabled="" value="hanmail.net">hanmail.net</option>
<option disabled="" value="naver.com">naver.com</option>
<option disabled="" value="naver.com">naver.com</option>
<option disabled="" value="naver.com">naver.com</option>
<option disabled="" value="naver.com">naver.com</option>
</select>
</div>
</td>
</table>
</div>
</fieldset>
</form>
ํ ๋ง๋ค.. (์ด๊ฒ ๋ฒ์จ ๋ง๋ค๊ณ ์๊ฐํ๋ฉด ์๋๋๋ฐ ^_^)
์ด๋ฉ์ผ ๋ถ๋ถ ๋์ด๋ฅผ ์กฐ์ ํด์ฃผ๊ธฐ ์ํด class๋ฅผ ๋ฐ๋ก ์ง์ ํด์ค๋ค. input class="input_small"
๋ฉ์ผ ๋ฐ์ค๊ฐ ๋ค๋ฅธ ๋ฐ์ค์ ๊ธธ์ด๊ฐ ๋ค๋ฅด๊ธฐ ๋๋ฌธ์
์ง์ ๋ ํด๋์ค๋ก ๋์ด ๋ฐ ๊ฐ๊ฒฉ์กฐ์
.inquiry_page .inquiry_area input[type=text].input_small {
width: 200px;
}
.inquiry_page .inquiry_area .email {
margin: 0 16px;
}
.inquiry_page .inquiry_area .select_wrap {
margin-left: 6px;
}
.inquiry_page .inquiry_area .select_city {
margin-left: 0;
}
๋ง์ง๋ง์ผ๋ก select option ์ผ๋ก ๋ค์ด๊ฐ ์ต์ ๋ฐ์ค๋ฅด ๋์์ธ ํด์ฃผ์
html ์ฝ๋
option disabled ๋นํ์ฑํ ํด์ฃผ๊ธฐ value ๊ฐ ์ง์ ํ ์คํธ์ ๋ ฅ
๋ณดํต value ๋ฐ์ดํฐ๋ ๋ฐฑ์๋์์ ์์ ํ๋ค.
after ๋ก ๊พธ๋ฉฐ์ฃผ๊ธฐ
css select ๊ณตํต์ผ๋ก ์์น ๋ฐ ๋์์ธ ์ก์์ฃผ๊ธฐ
์ด๋ก์ ํ์ดํ๊ฐ ๋ฐ์ ๊น๋ ค ๋ณด์ด์ง ์์ผ๋ฏ๋ก position x-index๋ก ๋์ด์ค๋ค.
.select_wrap {
display: inline-block;
width: 192px;
border: 1px solid #999999;
position: relative;
z-index: 0;
}
.select_wrap:after {
content: '';
position: absolute;
z-index: -1;
right: 15px;
top: 50%;
width: 12px;
height: 7px;
margin-top: -4px;
background: url(../images/icon_select_arr.png) no-repeat;
}
๋ง์ง๋ง์ผ๋ก ์์ชฝ ์ ์ ๊ฑฐ
.select_wrap select {
width: 100%;
border: none;
height: 41px;
line-height: 41px;
padding: 0 10px;
color: #999;
cursor: pointer;
background: none;
}
ํฌ์ปค์ค ๋ ์์ ์์๋ผ์ธ์ด ๋จ์ง ์๋๋ก ๊ฐ๋ ค์ค๋ค.
'HTML๐จ > html&css ํผ์์' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
css form input type="file" ์ฒจ๋ถํ์ผ์ฌ๋ฆฌ๊ธฐ (0) | 2022.10.10 |
---|---|
css text area ๊ณ ์ ๋ด์ฉ์ ๋ ฅ (placeholder ์ค๋ฐ๊ฟํ๊ทธ ) (0) | 2022.10.10 |
css form input type="text" readonly ๋ฌธ์ํ๊ธฐ ๋ง๋ค๊ธฐ (0) | 2022.10.10 |
css radio ๋ง๋ค๊ธฐ (0) | 2022.10.10 |
html form , input ์์ ์ ๋ฆฌ (0) | 2022.10.10 |
๋๊ธ