मैं एक <div>
कि दो span
शामिल है। एक आइकन के साथ एक (लंबा) पाठ और एक के साथ एक। पाठ लपेट जाएगा (हाइफ़न का उपयोग करके) और आइकन लंबवत रूप से इसके साथ गठबंधन किया जाएगा।खड़ी Hyphend पाठ संरेखित और आइकन
<!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" xml:lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta content="IE=Edge" http-equiv="X-UA-Compatible"/>
<style>
tr > th > span.text {
webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; -o-hyphens: auto; hyphens: auto;
}
tr > th > span.icon {
float: right; vertical-align: middle;
}
</style>
</head>
<body>
<table width="200px" style="table-layout:fixed">
<tr>
<th>
<span class="text" lang="de">Donaudampfschifffahrtsgesellschaftskapitän</span>
<span class="icon">
<img title="Icon" src="AufsteigendSortieren_d9d9d9.png">
</span>
</th>
<th>
<span class="text" lang="de">Donaudampfschifffahrtsgesellschaftskapitän</span>
<span class="icon">
<img title="Icon" src="AufsteigendSortieren_d9d9d9.png">
</span>
</th>
<tr>
</table>
</body>
</html>
जिसके परिणामस्वरूप एचटीएमएल दिखना चाहिए
Donaudampfschiff-
fahrtsgesellschafts (icon here)
kapitän
काम नहीं करता - ओपी अब शब्द हाइफ़न का उपयोग कर तोड़ा जा की आवश्यकता है: http://jsfiddle.net/bupr4c2k/1/ – Paul
Unforunately इस नहीं है हमारे मामले में काम करते हैं क्योंकि बाहरी अंतर वास्तव में एक टेबल है। मैं –
@ क्रिस्टियन डायट्रिच के अनुसार प्रश्न को अद्यतन करता हूं, तालिका मेरे समाधान में एकमात्र समस्या है? – LeoAref