2013-10-17 36 views
3

我有一個文本只是沒有停留在一個div,我不知道爲什麼,我從來沒有林前遇到了這個問題,希望有人能幫助我,我的繼承人代碼:文本不能呆在裏面的div

HTML:

<div id="toronto-content"> 

Interactively pursue long-term high-impact vortals and distributed systems. Competently streamline team driven testing procedures without leading-edge intellectual capital. Energistically engage market-driven catalysts for change via client-centered technologies. Compellingly architect long-term high-impact intellectual capital and resource-leveling interfaces. Phosfluorescently initiate market positioning supply chains with stand-alone processes. 

Collaboratively generate leading-edge services for synergistic e-markets. Conveniently syndicate bleeding-edge resources whereas equity invested scenarios. Collaboratively parallel task backward-compatible deliverables and business relationships. Assertively implement turnkey niche markets for technically sound human capital. Collaboratively integrate pandemic niche markets with corporate action items. 

Quickly utilize timely paradigms after best-of-breed infomediaries. Appropriately drive future-proof initiatives via standards compliant opportunities. Uniquely coordinate 24/365 mindshare vis-a-vis top-line synergy. Phosfluorescently benchmark one-to-one mindshare with high-payoff best practices. Distinctively supply principle-centered relationships whereas revolutionary relationships. 

</div> 

CSS:

#toronto-content { position:relative; z-index:98; height:100%; width:700px; background-color:#0A0A0A; color:#FFF;} 
如果你想看看完整的網站的點擊這裏

http://lasociete.ca/new/

+0

您的文字完全沒有任何加價。這是一條很長的路線! –

+0

您鏈接的網站中沒有文字。我不知道你的意思是「呆在」裏。 [這個jsfiddle](http://jsfiddle.net/6Ga2G/)看起來和預期的一樣。 – bfavaretto

+0

適合我。看到這裏:http://jsbin.com/ihAZOvi/1/ – Accelerator

回答

8

這將解決您的問題:

#toronto-content { 
    white-space: normal; 
} 

但我會考慮把你的文字變成<p><span>標籤。

+2

獲勝者Winner雞晚餐 – user2820604

2

這是因爲文字量大於div
我建議將overflow:overlay添加到您的樣式中,這會在內容旁邊創建一個垂直滾動條。

如果添加overflow:scroll,即使沒有必要,它也會創建一個水平滾動條。

如果這不是你想要的,你應該在內容過多的時候添加頁面(稱爲「分頁」)或者使用Javascript或jQuery自定義垂直滾動條。

0

添加此

#toronto-content { 
    white-space: normal; 
    overflow: hidden; 
}