注意:我的div有一个自动宽度,我想保留它。我认为我的问题将得到解决,如果我不知何故使用CSS来给出与其当前(自动)宽度相等的最大宽度,但我没有找到任何东西。在div中包装文本而不是展开它
这里是我的CSS:
div.chat div#chatOutput {
height: 370px;
margin-bottom: 5px;
max-height: 450px;
min-height: 130px;
border: 1px solid;
overflow-y: scroll;
padding: 5px;
}
而我的HTML:
<div class="chat">
<h4><a title="Click to copy channel link" href="#">#</a> <span id="chatChannelName">General</span></h4>
<div id="chatOutput"></div>
<br />
<div class="chat-group">
<input type="text" maxlength="80" class="form-control" id="chatInput" placeholder="Type your message.." />
<button class="btn btn-primary" id="chatSend"><i style="float: none;" class="fa fa-send"></i> Send</button>
</div>
</div>
您可以将您的代码片断^ h ERE? –
我们应该用photoshop还是用一些代码来帮助你? –