Fix input/message alignment on wide screens

- Add max-width 800px to message list and input area
- Center align both components for consistent layout
- Wrap input in container for full-width background

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-19 10:33:07 +09:00
parent 554c578345
commit 5e78b96733
4 changed files with 16 additions and 3 deletions

View File

@@ -124,6 +124,11 @@
overflow: hidden;
}
.input-area {
background: #16213e;
border-top: 1px solid #0f3460;
}
@media (max-width: 768px) {
.user-list {
display: none;

View File

@@ -169,7 +169,9 @@ function ChatRoom({ roomId, userName, onLeave }: ChatRoomProps) {
<main className="messages-container">
<MessageList messages={messages} />
<MessageInput onSend={handleSendMessage} disabled={!isConnected} />
<div className="input-area">
<MessageInput onSend={handleSendMessage} disabled={!isConnected} />
</div>
</main>
</div>
</div>

View File

@@ -2,8 +2,10 @@
display: flex;
gap: 12px;
padding: 16px;
background: #16213e;
border-top: 1px solid #0f3460;
max-width: 800px;
margin: 0 auto;
width: 100%;
box-sizing: border-box;
}
.message-input .input-wrapper {

View File

@@ -5,6 +5,10 @@
display: flex;
flex-direction: column;
gap: 12px;
max-width: 800px;
margin: 0 auto;
width: 100%;
box-sizing: border-box;
}
.empty-state {