Header

  1. View current page

    석영이의 낙서장!

Profile_image?t=1225438807&type=small
훗!~ 밥은 먹고 다니냥?
0

div ... 처리하기

td 에 nobr 처리 말고 div 에서 지정한 width 보다 커지면 줄바꿈 없이 문장 마지막을 "..." 로 변경해서 처리

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> div ... 처리하기 </title>
<style type="text/css">
.test {
 /* text-overflow: ellipsis; css3 버전이라서 몇몇 브라우저에서는 불안정하게 표시될수도 있습니다.*/
 text-overflow: ellipsis;
 white-space : nowrap;
 overflow: hidden;
 width: 30px;
}
</style>
</head>
<body>
<div class="test">지정한 WIDTH 보다 글자길이가 커지면 문장 마지막에 "..." 표시 됩니다.</div>
</body>
</html>

div_nobr.html

Tags

History

Last edited on 08/06/2008 00:19 by 김석영

Comments (0)

You must log in to leave a comment. Please sign in.