html - Align text to right of checkbox and center buttons -
i want html/css match in following picture:
this html/css looks like:
there 4 things having issues in html/css picture doing:
- align text right of checkbox in such way no text appears directly below checkbox
- make 2 buttons in picture same size
- make 2 buttons centered according white text paragraph above
- i can't seem #2 , #3 @ same time.
any other discrepancies between 2 pictures can ignored.
how accomplish items 1-4 mentioned above?
this plunker link: http://plnkr.co/edit/dfzg2c1zrqdesdoba21t?p=preview
this html code:
<!doctype html> <html> <head> <link rel="stylesheet" href="style.css"> <script src="script.js"></script> </head> <body> <div id="loadingdiv"> <div class="loadingtext"> <p style="color:red"><strong>attention! must agree continue online forms</strong></p> <p><input type="checkbox"/>lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <div class="btn-group"> <button class="btn btn-dont-allow">don't allow</button> <button class="btn btn-consent-ok">ok</button> </div> </div> </div> </body> </html>
this css:
#loadingdiv .btn { min-width: 30%; } #loadingdiv .btn-group { margin-left:35%; position: relative; } #loadingdiv .loadingtext { position: relative; left: 25%; top: 25%; width: 50%; color: white; } #loadingdiv .btn-dont-allow { background-color: #808083; color: #ffffff; padding: 3px 50px; font-size: 16px; margin-left: 3px; margin-right: 3px; } #loadingdiv .btn-consent-ok { background-color: #1aa8de; color: #ffffff; padding: 3px 50px; font-size: 16px; margin-left: 3px; margin-right: 3px; } #loadingdiv { margin: 0px 0px 0px 0px; position: fixed; padding: 0; margin: 0; top: 0; left: 0; height: 100%; z-index: 9999; width: 100%; clear: none; background-color: rgba(68, 176, 129, 0.9); }
p.s: markup in picture not created using html/css, prototyping app, can't extract source.
see fiddle https://jsfiddle.net/dirty_smith/avocyf33/7/
added this
p { display: block; padding-left: 15px; text-indent: -15px; } input { width: 13px; height: 13px; padding: 0; margin:0; vertical-align: bottom; position: relative; top: -1px; }
and added min-width: 400px;
btn-group
keep buttons wrapping.
Comments
Post a Comment