1
0

Fix scrolÃing and review breakÃpoints

This commit is contained in:
eorg_oz 2017-03-11 16:23:55 +01:00
parent 236cae183a
commit de0480b859
2 changed files with 64 additions and 26 deletions

View File

@ -137,7 +137,7 @@
</div> </div>
</div> </div>
<div id="footer"> <div id="footer">
<h2>Send an SMS with a message to <span class="number" style="color:#3399ff;"></span></h2> <h2 style="display: none;">Send an SMS with a message to <span class="number" style="color:#3399ff;"></span></h2>
</div> </div>
</div> </div>
</body> </body>

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=320, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Chat</title> <title>Chat</title>
<script src="/js/jquery-1.12.1.min"></script> <script src="/js/jquery-1.12.1.min"></script>
<script src="/js/jquery-ui.js"></script> <script src="/js/jquery-ui.js"></script>
@ -97,7 +97,7 @@
#chat_box { #chat_box {
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: calc(100% - 50px);
overflow: auto; overflow: auto;
padding-bottom: 50px; padding-bottom: 50px;
} }
@ -116,14 +116,18 @@
position: relative; position: relative;
} }
#user { width: 20%; } #number {
#message { width: 68%; } width: 20%;
max-width: 240px;
}
#message {
width: calc(90% - 360px);
}
#send_btn { #send_btn {
width: 10%; width: 120px;
position: absolute; position: relative;
right: 0; margin: 2px;
bottom: 0;
margin: 0;
} }
.content { .content {
@ -140,20 +144,23 @@
input[type="text"] { input[type="text"] {
background-color: #146EA8; background-color: #146EA8;
padding: 3px 10px; padding: 3px 10px;
margin: 2px;
max-width: 92%;
} }
input[type="button"] { input[type="button"] {
background-color: #f39c12; background-color: #f39c12;
border-right: 2px solid #e67e22; border-right: 1px solid #e67e22;
border-bottom: 2px solid #e67e22; border-bottom: 1px solid #e67e22;
min-width: 70px; min-width: 70px;
display: inline-block; display: inline-block;
position: relative;
} }
input[type="button"]:hover { input[type="button"]:hover {
background-color: #e67e22; background-color: #e67e22;
border-right: 2px solid #f39c12; border-right: 1px solid #f39c12;
border-bottom: 2px solid #f39c12; border-bottom: 1px solid #f39c12;
cursor: pointer; cursor: pointer;
} }
@ -165,23 +172,54 @@
font-size: 16px; font-size: 16px;
} }
@media(max-width: 1000px) { @media screen and (max-width: 1000px) {
.content { width: 90%; } .content { width: 90%; }
#send_btn {
position: relative;
}
} }
@media(max-width: 780px) { @media screen and (max-width: 780px) {
#footer { height: 91px; } #footer {
#chat_box { padding-bottom: 91px; } height: 91px;
}
#chat_box {
padding-bottom: 91px;
height: calc(100% - 91px);
}
#user { width: 100%; } #number {
#message { width: 80%; } width: 100%;
}
#message {
min-width: 60%;
}
#send_btn {
position: absolute;
right: 0;
bottom: 3px;
margin: 0;
width: 10%;
}
} }
@media(max-width: 400px) { @media screen and (max-width: 400px) {
#footer { height: 135px; } #footer {
#chat_box { padding-bottom: 135px; } height: 135px;
}
#chat_box {
padding-bottom: 135px;
height: calc(100% - 135px);
#message { width: 100%; } }
#number {
max-width: none;
width: 93%;
}
#message {
width: 93%;
}
#send_btn { #send_btn {
position: relative; position: relative;
margin-top: 3px; margin-top: 3px;
@ -197,7 +235,7 @@
<div id="footer"> <div id="footer">
<div class="content"> <div class="content">
<input type="text" id="number" value="+4301234567890" /> <input type="text" id="number" value="+4301234567890" />
<input type="text" id="message" onkeypress="return submitEnter(event)" placeholder="Enter a Test Message! (Or emoji!, google if if you don't know how)" /> <input type="text" id="message" onkeypress="return submitEnter(event)" placeholder="Enter a Message" />
<input type="button" id="send_btn" value="Send" onclick="sendMessage()"> <input type="button" id="send_btn" value="Send" onclick="sendMessage()">
</div> </div>
</div> </div>