Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SIngle word does'nt wrap for a japaneese word in table

Tags:

html

css

I have a table where table width can be anything depending upon number of columns. In a particular column, there will be contact name in any language.

In all other languages, the single word appears for full width. But in Japanese language, the single word breaks, by auto wrapping it.

I want to know the exact reason behind it.enter image description here

Please find my workout here

<div id="test" style="border:1px solid #ddd; width:200px">
     <h3>    Normal English Language</h3>

    <table class="tbl eng">
        <tr>
            <th>heading1</th>
            <th>Heading2</th>
            <th>Heading3</th>
        </tr>
        <tr>
            <td>accoutrements</td>
            <td>accoutrements</td>
            <td>accoutrements</td>
        </tr>
    </table>
     <h3>    Japaneese Language</h3>

    <table class="tbl jpn">
        <tr>
            <th>Heading1</th>
            <th>Heading2</th>
            <th>Heading3</th>
        </tr>
        <tr>
            <td>わかりません</td>
            <td>わかりません</td>
            <td>の着用</td>
        </tr>
    </table>
</div>
like image 691
karthipan raj Avatar asked Dec 07 '25 03:12

karthipan raj


1 Answers

It has nothing to do with the japanese characters, it is just that the text doesn't fit in the cell (it uses the first row to determine the size) , splitting only occurs on words (separated by space). In japanese this is more complicated since one character can be one word.

http://jsfiddle.net/s6s6fzbp/ use tags for the header is advised. and use nowrap to prevent it from going to a new line.

   <tr>
                <th nowrap>わかりません </th>
                <th>わかりません</th>
                <th>の着用</th>
            </tr>
like image 72
Alex Avatar answered Dec 08 '25 18:12

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!