2015-04-21 17 views
-1

我在PHP代碼通知,它的工作原理,但它出來尋找這樣的...我的文字是自動斷時,我甚至不添加<br>標籤

enter image description here

我沒加br標籤爲什麼TEXT中斷?

這裏的代碼行...

echo "<div class='entire' style='width:100%;height:200px;'><div class=" . $row["not_type"]. " style='height:50px;width:50px';>" . $row["from_user_id"]. " " . $row["from_username"]. " " . $row["not_text"]. "  " . $row["post_id"]. "" . $row["post_content_url"]. " " . $row["post_id"]. "<br>"; 

我該如何解決這個問題?

+0

你不關你的'div'標籤在你的迴音 –

+0

的不是具體的這個@PedroLobito? –

回答

1

默認情況下,文本將包裝以適應容器。如果你不想讓文字套上white-space: nowrap。如果你然後得到一個滾動條,你可以添加overflow: hidden

您的貨櫃只有50px寬。

0

您錯過了回聲中的</div>

試試這個:

echo "<div class='entire' style='width:100%;height:200px;'><div class=" . $row["not_type"]. " style='height:50px;width:50px';>" . $row["from_user_id"]. " " . $row["from_username"]. " " . $row["not_text"]. "  " . $row["post_id"]. "" . $row["post_content_url"]. " " . $row["post_id"]. "</div><br>"; 
相關問題