채택완료

게시판 제목을 두줄로 표현하고싶습니다.

2017-09-18 (월) 12:58:14 4,363

게시글을 두줄로 나오게하는방법이 있을까요?

대게 1줄에 ...표시를 사용하시는데

저는 2줄에 ...표시를 사용하고싶네요..

적절한 예문 있으면 조언 부탁드리겠습니다.

|

답변 3개

채택된 답변
+20 포인트
게시판 설정에서 제목 길이를 늘려주면 됩니다.
2017-09-18 (월) 14:12:20
한줄 소스들을 제거하신후 height값을 주신후 overflow:hidden해 주시면 될듯 합니다

간단하게 아래와 같이 width 와 height 로 대략적인 line 을 표현할수 있습니다.

Copy
<!DOCTYPE html><html>    <head>        <meta charset="UTF-8" />        <title>title</title>        <style type="text/css">        .board { border-collapse: collapse; }        .board td, .board th { border: 1px solid #000; }        .board tfoot td { border: none; text-align: center; }        .subject span {            display: inline-block;            width: 25%;            height: 2.0em;            line-height: 1.05em;            overflow: hidden;        }        .subject:after { content: "..."; display: inline-block; }        </style>            </head>    <body>        <table class="board">            <colgroup>                <col width="10%" />                <col width="70%" />                <col width="20%" />            </colgroup>            <thead>                <tr>                    <th>no</th>                    <th>subject</th>                    <th>date</th>                </tr>            </thead>            <tfoot>                <tr>                    <td colspan="3">1 2 3 4 5</td>                </tr>            </tfoot>            <tbody>                <tr>                    <td>3</td>                    <td class="subject">                        <span>                        게a시bc글을 d 두大줄韓民로 國 나오게게a시bc글을 d 두大줄韓民로 國 나오게                        </span>                    </td>                    <td>2017-09-18</td>                </tr>                <tr>                    <td>2</td>                    <td class="subject">                        <span>                        韓民로 國 나오게게a시bc글을 d 두大줄韓民로韓民로 國 나오게게a시bc글을 d 두大줄韓民로                        </span>                    </td>                    <td>2017-09-17</td>                </tr>                <tr>                    <td>1</td>                    <td class="subject">                        <span>                        c글을 d 두大줄韓民로 國 나오게게ac글을 d 두大줄韓民로 國 나오게게a                        </span>                    </td>                    <td>2017-09-16</td>                </tr>            </tbody>        </table>    </body></html>

답변을 작성하려면 로그인이 필요합니다.