html - Styling <form> tag -
i familiar html/css not advanced means.
i having difficulty styling form element.
i want add padding around form whenever pads top , left
the other issue when re-size window small form tag seems protrude out of
i know proper way is.
also, if on simple code , let me know if there better/more standard way trying here.
* { box-sizing: border-box; font-size: 15px; margin: 0; } body { padding: 5%; } section { height: 100%; float: left; position: relative; } div {} .left-section { width: 25%; } .right-section { width: 75%; } .body-left { background-color: #000000; height: 93%; } .body-right { background-color: #dcdcdc; height: 86%; } .header { background-color: #808080; height: 7%; } .footer { background-color: #808080; height: 7%; width: 100%; position: absolute; padding: 5px; } form { position: absolute; height: 100%; width: 100%; display: block; } input { background-color: #808080; border-style: solid; border-width: small; border-color: #555555; border-radius: 5px; position: absolute; padding: 10px; left: 0; height: 80%; width: 90%; top: 50%; transform: translatey(-50%); } button { background-color: #808080; border-style: solid; border-width: small; border-color: #555555; border-radius: 5px; height: 80%; width: 10%; position: absolute; color: #555555; top: 50%; right: 0; transform: translatey(-50%); }
<html> <head> <title>whisper</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <section id="left" class="left-section"> <div id="header_left" class="header"> </div> <div id="body_left" class="body-left"> <ol id="users"></ol> </div> </section> <section id="right" class="right-section"> <div id="header_right" class="header"> </div> <div id="body_right" class="body-right"> <ol id="messages"></ol> </div> <div id="footer" class="footer"> <form id="form_id" action="#"> <input id="user_input" /> <button id="btn_id">send</button> </form> </div> </section> </body> </html>
p.s. have checkout page couldn't find sufficient answer.
i not know if helps switched padding of 5 pixels footer class form styling.
.footer { background-color: #808080; height: 7%; width: 100%; position: absolute; } form { position: absolute; height: 100%; width: 100%; display: block; padding: 5px; }
Comments
Post a Comment