<分区>
<分区>
我有一个php的论坛系统,但是发帖的时候,如果很长,最后会变成这样,
html,
body {
height:100%;
width:100%;
background: url(/include/images/dirt.png);
}
.center-container {
margin-top:15px;
margin-right:15%;
margin-left: 15%;
box-shadow: 0 1px 10px #a7a7a7, 0 1px 0 #fff;
padding:0.5em;
}
.button {
border-top: 1px solid #002136;
background: #033e66;
background: -webkit-gradient(linear, left top, left bottom, from(#031826), to(#033e66));
background: -webkit-linear-gradient(top, #031826, #033e66);
background: -moz-linear-gradient(top, #031826, #033e66);
background: -ms-linear-gradient(top, #031826, #033e66);
background: -o-linear-gradient(top, #031826, #033e66);
padding: 5px 10px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: white;
font-size: 14px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
padding-bottom:3px;
margin-right:5px;
}
.button:hover {
border-top-color: #28597a;
background: #28597a;
color: #ccc;
}
.button:active {
border-top-color: #1b435e;
background: #1b435e;
}
.sidebar1 {
margin-top:15px;
float:left;
width:13%;
display:inline-block;
box-shadow: 0 1px 10px #a7a7a7, 0 1px 0 #fff;
}
.sbutton {
border-top: 1px solid #002136;
background: #033e66;
background: -webkit-gradient(linear, left top, left bottom, from(#031826), to(#033e66));
background: -webkit-linear-gradient(top, #031826, #033e66);
background: -moz-linear-gradient(top, #031826, #033e66);
background: -ms-linear-gradient(top, #031826, #033e66);
background: -o-linear-gradient(top, #031826, #033e66);
padding: 5px 10px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: white;
font-size: 14px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
padding-bottom:3px;
display:block;
}
.sbutton:hover {
border-top-color: #28597a;
background: #28597a;
color: #ccc;
}
.sbutton:active {
border-top-color: #1b435e;
background: #1b435e;
}
有没有我可以使用的 CSS 规则来换行到下一行?
编辑:已解决!这实际上似乎是 Firefox 的问题。不知道为什么,但是如果在firefox中设置了width,即使是max-width,也会不知为何会溢出框
最佳答案
您可以使用 CSS3 text-wrap 属性:
http://www.w3schools.com/cssref/css3_pr_text-wrap.asp
p.test {text-wrap:unrestricted;}
关于php - 文字流出包含Div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23480913/
相关文章:
php - Jquery Ajax从php mysql获取数据而不刷新页面 - 语法错误
php - WordPress。使用remove_cap(),即使删除此功能后仍获得 "Sorry, you are not allowed to access this page."
javascript - Angular Js ng-disabled 按钮的颜色无论启用还是禁用都保持不变
javascript - 带渲染器的 Angular 2+ CSS 自定义属性(变量)
css - @media 规则 - 在 NavBar 中强制换行,并在此行中显示之前右对齐的链接,但居中对齐
javascript - 移动 View 中的 slider ,显示下一张图像的一半