div의 전체 너비를 "채우기"위해 노력하고있는 인라인 목록이 있습니다.CSS 인라인 목록 여백
목록에서 margin-right를 사용하는 경우 마지막 요소는 div의 끝에 도달하지 않거나 (오른쪽 여백을 가졌기 때문에) 오른쪽 마진에 따라 초과 할 때 다음 행으로 이동하게됩니다 div의 폭
여기에 제가 설명하는 예제가 있습니다.
내 HTML :
<div id="footerstick" style="background:url(site_files/bg_shears.png) repeat-x; ">
<div id="footer_wrap">
<div id="footer_top_shelf">
<ul>
<li>Contact Us</li>
<li>FAQ</li>
<li>About Us</li>
<li>Distribution</li>
</ul>
</div>
</div>
</div>
내 CSS :
#footerstick {
position: relative;
margin-top: -230px; /* negative value of footer height */
height: 230px;
clear:both;
}
#footer_wrap {width:980px; margin:auto;}
#footer_top_shelf {height:70px; overflow:hidden; }
#footer_top_shelf ul li {display:inline; list-style:none; color:#c7c7c7; font-size:30px; margin-right:85px; line-height:75px; text-transform:uppercase; font-family:myriad pro; }
무엇이 질문입니까? – Madbreaks
첫 번째 목록 요소를 왼쪽에서 끝까지 가져올 수 있으며 마지막 요소를 오른쪽 끝까지 올리려면 어떻게해야합니까? 나는 나이가 많은 broswers와 호환되지 않기 때문에 n 번째 자식 선택기를 사용하고 싶지 않다고 생각합니까? – Sackling