text-overflow:ellipsis; 가 안먹습니다.[해결]
BlackCat
안녕하세요. 모바일웹 코딩하고 있는데요.
css3를 쓰고 있는데 말줄임표 text-overflow:ellipsis; 테그가 안먹고 title쪽이 내려와 버리네요...
전 디자이넌데 이거 안되면 그냥 개발에 넘겨줘도 해결해 주실수있나요..
도움좀 부탁드립니다.html//
div class=roundbox3 style=margin-top:8px;
ul
li class=rowa href=# class=btn_dtview상세보기/aa href=# class=titlep아티스트1아티스트1아티스트1아티스트1/p/a/li
li class=rowa href=# class=btn_dtview상세보기/aa href=# class=titlep아티스트2/p/a/li
li class=rowa href=# class=btn_dtview상세보기/aa href=# class=titlep아티스트3/p/a/li
li class=rowa href=# class=btn_dtview상세보기/aa href=# class=titlep아티스트10/p/a/li
/ul
/div
css//
.title{display:block; padding-top:5px;}
.row:nth-child(even) {clear:both; background:#f0f0f0 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#f0f0f0));
background:#f0f0f0 -moz-linear-gradient(top, #fff, #f0f0f0);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#fff, endColorStr=#f0f0f0);}
.row:nth-child(odd) {clear:both; background: white;}
.btn_dtview{float:right; display:block; margin:10px 6px; height:36px; width:38px; background:url(img/img_master.png) no-repeat; background-position:0px -136px; text-indent:-5000px;}
.roundbox3{}
.roundbox3 ul li{width:100%;border-bottom: 1px solid #ccc; border-left: 1px solid #ccc; border-right: 1px solid #ccc; height:40px;}
.roundbox3 ul li:first-child {border:1px solid #c1c1c1;}
.roundbox3 ul li:last-child { -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; -moz-border-radius-bottomleft:5px; -moz-border-radius-bottomright:5px;}
.roundbox3{clear:both; position:relative;}
.roundbox3 ul li p {float:left;width:70%; overflow:hidden;text-overflow:ellipsis; -o-text-overflow: ellipsis; background:#9C0;}
.roundbox3 ul li p a{}
.roundbox3 .title{display:block; padding:10px 0 0 13px; height:30px;}
.roundbox3 .btn_dtview{float:right; display:block; margin:5px 6px; height:30px; width:38px; background:url(img/img_master.png) no-repeat; background-position:0px -139px; text-indent:-5000px;}결과//
-
아이폰
오오 고맙습니다~!!
-
Sweeety
그렇군요~~ 좋은거 배워갑니다^^
-
낶아
말줄임표 속성과 위 속성은 항상 같이 써줘야 적용됩니다.
그리고 a안에 p가 위치해 있는데요. 이처럼 인라인 태그안에 블록 태그가 위치하는 것은 잘못된 방식입니다.
p대신에 span을 넣은 후 span{display:block}를 주시면 올바른 형식이면서 똑같은 효과를 줄 수 있습니다. -
해련
아... 수다님 천재 ㅠ0ㅜb
-
빛나라
줄바뀜 방지군요~~ㅋ
-
내꽃
해당 부분에 {white-space:nowrap} 이것도 같이 넣어주세요