मैं एक html तालिका है कि यह माता पिता के कंटेनर बह निकला है के साथ मुद्दों कर रहा हूँ।
.page {
width: 280px;
border:solid 1px blue;
}
.my-table {
word-wrap: break-word;
}
.my-table td {
border:solid 1px #333;
}
<div class="page">
<table class="my-table">
<tr>
<th>Header Text</th>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
<th>Col 4</th>
<th>Header Text</th>
</tr>
<tr>
<td>An archipelago is a chain or cluster of islands. The word archipelago is derived from the Greek ἄρχι- – arkhi and πέλαγος – pélagosthrough the Italian arcipelago. In Italian, possibly following a tradition of antiquity, the Arcipelago (from medieval Greek *ἀρχιπέλαγος) was the proper name for the Aegean Sea and, later, usage shifted to refer to the Aegean Islands (since the sea is remarkable for its large number of islands). It is now used to refer to any island group or, sometimes, to a sea containing a large number of scattered islands such as the Aegean Sea.[1]</td>
<td>some data</td>
<td>some data</td>
<td>some data</td>
<td>some data</td>
<td>An archipelago is a chain or cluster of islands. The word archipelago is derived from the Greek ἄρχι- – arkhi and πέλαγος – pélagosthrough the Italian arcipelago. In Italian, possibly following a tradition of antiquity, the Arcipelago (from medieval Greek *ἀρχιπέλαγος) was the proper name for the Aegean Sea and, later, usage shifted to refer to the Aegean Islands (since the sea is remarkable for its large number of islands). It is now used to refer to any island group or, sometimes, to a sea containing a large number of scattered islands such as the Aegean Sea.[1]</td>
</tr>
</table>
</div>
मैं हेडर टेक्स्ट और टेबल सेल टेक्स्ट दोनों को इस तरह से लपेटने के लिए कैसे मजबूर कर सकता हूं कि यह अपने कंटेनर में ठीक से फिट हो जाए? मैं एक CSS केवल विधि को प्राथमिकता दूंगा, लेकिन यदि आवश्यक हो तो जावास्क्रिप्ट (या jQuery) का उपयोग करने के लिए भी खुला हूं।
word-wrap: break-word;