-1
我的列表視圖中添加換行符時遇到問題。其實我有white-space: normal; width: 80%;
但沒有任何反應。總是有「......」。我的代碼中的哪些行/元素阻止這些函數? 列表項中的換行符問題
<div class="ui-page" data-theme="b" data-role="page" id="own posts" >
<div data-role="header" >
<a class="ui-btn-right" data-icon="edit" href="#create post" >search</a>
<h1>loca</h1>
</div>
<div class="ui-content">
<?php
include("new.php");
?>
<h2>own posts:</h2>
<div name="first" data-demo-html="true">
<ul data-role="listview" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
<?php foreach ($result as $key => $row): ?>
<li data-corners="false" style="margin-top:1%" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" >
<div class="ui-btn-inner ui-li"></div><div class="ui-btn-text"><a class="ui-link-inherit"></a><p class="ui-li-aside ui-li-desc"><strong></strong><?php
$curenttime = $row['time'];
$time_ago =strtotime($curenttime);
echo timeAgo($time_ago); ?></p>
<p style="white-space: normal; width: 80%;font-size: 102%;" class="ui-li-desc"><strong><?php echo $row['title']; ?></strong></p>
<p style="white-space: normal; width: 80%;font-size: 101%;" class="ui-li-desc"><?php echo $row['text']; ?></p>
<p style="font-size: 101%;" class="ui-li-desc">location: <?php echo $row['town']; ?></p>
<div class="ui-grid-a">
<div style="width:80%" class="ui-block-a">
<a class="commentbtn" data-rel="button" >comment</a>
<div id="createcomment" class="comment" >
<form style="width:70%" data-ajax="false" name="login-form" class="login-form" action="./comments.php" method="post">
<div class="content">
<div id="showcomments" >
<?php
include("showcom.php");
?>
<?php foreach ($commen as $keyCommen => $rowCommen): ?>
<div>
<p style="display : inline;" class="ui-li-desc"><strong><?php echo $rowCommen['username']; ?>:</strong></p>
<p style="display : inline;" class="ui-li-desc"><?php echo $rowCommen['comment']; ?></p>
</div>
<?php endforeach; ?>
</div>
<input type="hidden" name="id" id="id" value="<?php echo $row['id']; ?>" type="text" />
<input type="hidden" name="autorpost" id="autorpost" value="<?php echo $row['autor']; ?>" type="text" />
</div>
<div class="ui-grid-a">
<div class="ui-block-a"><input type="text" rows="1" name="text" id="text" class="foo"></div>
<div class="ui-block-b"><div class="ui-input-btn ui-btn ui-icon-carat-r ui-btn-icon-notext">
<input type="submit" name="submit" id="submit" data-enhanced="true" value="Enhanced - Icon only">
</div></div>
</div>
</form>
</div>
</div>
<div style="width:20%" class="ui-block-b">
<div id="deletepost" class="delete" >
<form data-ajax="false" name="login-form" class="login-form" action="./deleteposts.php" method="post">
<div class="content">
<input type="hidden" name="idelete" id="idelete" value="<?php echo $row['id']; ?>" type="text" />
</div>
<div class="foot">
<button type="submit" name="submit" data-role="none" data-icon="carat-r" class="button" >X</button>
</div>
</form>
</div>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
謝謝你,這是原因。 :) – Bodoppels