word-wrap プロパティを使用したい html iframe を設計しました。つまり、長い単語を次の行に分割する必要があります。しかし、代わりに、長い単語の場合、単語を次の行に分割するのではなく、水平スクロール バーを追加します。
"overflow:hidden" プロパティを使用してスクロール バーを非表示にしようとしましたが、何も起こりません。
私はここでいくつかの助けを借りることができます.
iframe の HTML コードは次のとおりです。
<div id="main_frame" >
<iframe id="main_frame" src="homedept.php" name="iframe_a"></iframe>
</div>
CSS は次のとおりです。
div#main_frame
{
float: left;
margin-top:198px;
margin-left:5px;
float:left;
position:relative;
width:100%;
height:900px;
z-index: 0;
word-wrap:break-word;
}
iframe#main_frame
{
float:left;
margin-left: 30px;
margin-right: 300px;
float:left;
border:none;
word-wrap:break-word;
width: 78%;
height:70%;
z-index: 1;
}
@tyriar に返信していただきありがとうございます。word-wrap プロパティを元のページに設定しました。それでも何も起こりません。
<div id="display_posts">
<?php //php echoes some text here ?>
</div>
CSS コードは次のとおりです。
#display_posts
{
word-wrap:break-word;
}