just such a problem – my contact page has a view bug when in the mobile view – the footer is aroused almost all over the screen and the contact form is on itsee screenshot, I marked the div that obviously causes problems . Checked all the HTML tags – they're OK, tried position of the objects in the CSS – nothing helps. In the desktop view everything looks OKsee screenshot. Here is the HTML document and a CSS file linked there. They are better to copy to an editor to run in a browser.
a {
color: #f91111;
}
a:hover {
color: #fff;
background: #f91111;
text-decoration: none;
}
body {
margin: 0;
padding: 0;
font-size: 97%;
line-height: 1.4em;
min-width: 500px;
font-family: Helvetica;
letter-spacing: 101%;
min-height: 100%;
}
header {
margin-bottom: 1%;
background-image: url(../images/DSC00075.JPG);
background-position: 0% 7%;
background-size: 100%;
background-opacity: 0.9;
background-color: #f91111;
padding: 1% 0 0%;
position: fixed;
z-index: 10;
width: 100%;
}
.header {
max-width: 1310px;
margin: 0 auto;
}
.collapse {
display: none;
}
.panel-group .panel-heading+.panel-collapse>.panel-body,
.panel-group .panel-heading+.panel-collapse>.list-group {
border-top: 1px solid #ddd;
}
main {
margin: 0 auto;
/* padding: 10% 15% 2.9%; */
font-size: 94%;
max-width: 1310px;
padding-top: 200px !important;
min-height: calc(74.75vh);
}
nav {
max-width: 750px;
text-align: left;
padding-bottom: 0.85em;
padding-left: 0.35em;
}
nav a {
display: inline;
text-align: left;
text-decoration: none;
padding: 2%;
margin-right: 4.8%;
border-radius: 5px;
color: #fff;
line-height: 1em;
}
nav a:hover {
background-color: #fff;
color: #000;
}
a.active {
background-color: #fff;
color: #000;
}
.footer {
font-size: 0.75rem;
padding: 1.5% 15% 1.25% 14.4%;
color: #fff;
}
h1 {
font-size: 4rem;
padding-bottom: 1rem;
padding-left: 0.8%;
color: #fff;
}
h2 {
font-size: 2.5em;
color: #f91111;
margin-bottom: 2.5rem;
line-height: 1.25em;
}
h3 {
font-size: 1.3em;
color: #f91111;
padding: 0.25% 0%;
}
h3.lebenslauf {
background: #f91111;
color: #fff;
padding: 0.25% 0% 0.25% 1%;
}
.hr4 .lightborder {
display: block;
width: 93%;
border-bottom: 1px solid #e8e8e8;
position: relative;
z-index: 1;
}
span.ul-second-line {
/*padding-left: 10px;*/
margin-left: 7px;
}
ul.Lebenslauf {
padding-left: 16px;
margin-top: 0px;
}
p.no-margin-before {
-webkit-margin-before: 0;
}
div.button {
display: inline;
font-size: 0.75rem;
padding: 5px;
margin-right: 10px;
min-width: 15%;
}
div.table-row {
max-width: 100%;
display: block;
margin-bottom: 0.75rem;
padding-left: 1px;
font-size: 0.95em;
}
div.left {
float: left;
width: 20%;
min-width: 150px;
display: inline;
}
div.right {
width: 75%;
display: inline-block;
}
.empty-bottom {
height: auto;
}
a.up-there {
text-decoration: none;
padding: 3px 5px;
}
div.kategorie a.up-there {
margin-right: -9px;
}
div.kategorie a.up-there:hover {
margin-right: 0px;
}
.collapse {
display: none;
}
strong.red-accentuation {
color: #f91111;
}
footer {
max-width: 100%;
background-color: #f91111;
padding: 0 2%;
vertical-align: bottom;
}
footer a {
color: white;
text-decoration: none;
margin-bottom: 0;
}
footer a:hover {
text-decoration: underline;
}
#image {
text-align: center;
width: auto;
border: none;
margin: 0 auto;
margin-bottom: 10px;
background-color: none;
font-size: 100%;
background-image: url('');
}
.empty-space {
text-align: right;
}
#image-alternative {
text-align: center;
margin: 0 auto;
margin-bottom: 10px;
}
.preview {
width: 10%;
margin-left: 10px;
border: 3px solid #f91111;
border-radius: 5px;
height: 15%;
}
.container {
max-width: 95%;
margin: 3% auto;
margin-left: 0;
padding: 10px;
padding-left: 0;
background-color: none;
overflow: hidden;
box-shadow: none;
}
.gallery ul {
list-style: none;
padding: 0;
margin: 0 auto;
}
.gallery li {
display: inline;
width: 50%;
height: 30vh;
margin: 2%;
margin-left: 0;
position: relative;
font-size: 0;
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
display: none;
overflow: hidden;
-webkit-overflow-scrolling: touch;
outline: 0;
}
.fade.in {
opacity: 1;
}
.fade {
opacity: 0;
-webkit-transition: opacity .15s linear;
-o-transition: opacity .15s linear;
transition: opacity .15s linear;
}
.referenz-link {
border: solid 1px #f91111;
border-radius: 10px;
width: 200px;
height: 200px;
margin-right: 30px;
margin-bottom: 30px;
overflow: hidden;
display: inline-block;
background: #f91111;
}
.referenz-link:last-child {
margin-right: 0px;
}
.referenz-link:hover {
background: none;
}
.picture-keeper {
overflow: hidden;
height: 133px;
margin-bottom: 10px;
border-bottom: solid 1px #f91111;
background: #fff;
}
img.reference {
width: 100%;
}
.notation {
padding: 0px 10px 15px;
text-align: center;
}
.referenz-link a {
color: #fff;
text-decoration: none;
font-weight: 700;
}
.referenz-link a:hover {
color: #f91111;
background: #fff;
}
h1.header {
display: inline-block;
}
img.presentation {
display: block;
margin-left: -1em;
}
h2.with-picture {
display: inline-block;
}
.foto-presentation {
text-align: center;
margin-bottom: 2.5em;
}
.adress-left {
display: inline-block;
float: left;
width: 48%;
margin-right: 2%;
}
.form-right {
display: inline-block;
width: 48%;
float: right;
}
dd,
dt {
display: inline-block;
}
dd {
margin-left: 0;
}
dt {
width: 7em;
}
dl {
-webkit-margin-before: 0;
-webkit-margin-after: 0;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
}
address {
font-style: normal;
}
label.kontaktangabe {
width: 8em;
display: inline-block;
}
textarea,
input[type="text"] {
border: solid 1px #f91111;
border-radius: 3px;
padding: 4px;
line-height: 1.5em !important;
}
textarea {
font: 400 0.95em Arial;
}
div#nachricht label {
vertical-align: top;
}
button.buttons {
color: #fff;
background: #f91111;
border: none;
border-radius: 3px;
font-size: 14px;
padding: 7px;
}
button.buttons:hover {
background: #a60c0c;
}
#kontaktdaten div.table-row {
font-size: 1em;
}
#kontaktdaten form {
padding-top: 1em;
}
#media screen and (min-width: 500px) and (max-width: 790px) {
header {
background-position: 0% 10%;
background-size: 100%;
padding: 1% 1% 1%;
margin: 0;
}
h1 {
font-size: 3rem;
}
nav a {
padding: 1.5%;
margin-right: 1%;
border-radius: 2px;
}
nav {
align: left;
padding-bottom: 0.1rem;
}
main {
margin: 0% 1%;
padding: 1%;
}
div.left {
margin-right: 1rem;
min-width: none;
}
.referenz-link {
width: 200px;
height: 200px;
margin-right: 45px;
margin-bottom: 45px;
}
.referenz-link:last-child {
margin-right: 0px;
}
.picture-keeper {
height: 133px;
}
.notation {
font-size: 1em;
}
.adress-left {
display: block;
width: 95%;
margin-bottom: 2em;
}
.form-right {
display: block;
width: 95%;
float: left;
}
label.kontaktangabe {
display: block;
}
}
#media screen and (max-width: 480px) {
body {
max-width: 450px;
font-size: 0.9rem;
padding: 0%;
}
header {
padding: 0% 1% 1%;
margin: 0;
background-position: 0% 0%;
background-repeat: no-repeat;
background-size: cover;
}
h1 {
font-size: 2rem;
}
nav {
max-width: 480px;
align: left;
padding-bottom: 0.6em;
}
nav a {
display: block;
text-align: left;
text-decoration: none;
padding: 1.5%;
margin: 0.5% 0%;
border-radius: 2px;
max-width: 30%;
}
main {
margin: 0% 0% 0% 1;
padding: 1% 0% 1% 1%;
max-width: 450px;
font-size: 100%;
}
div.left {
width: 100%;
float: none;
display: block;
min-width: 0;
}
div.right {
max-width: 100%;
display: block;
}
.hr4 .lightborder {
display: block;
max-width: 100%;
}
div.button {
display: block;
max-width: 50%;
text-align: center;
margin: 0 auto;
}
footer {
max-width: 480px !important;
}
.container {
padding: 0%;
}
img.preview {
margin-left: 0%;
margin-right: 2%;
}
.footer {
padding: 1.5% 0%;
max-width: 450px;
}
.referenz-link {
margin-right: 45px;
margin-bottom: 45px;
}
.notation {
font-size: 1.25em;
}
.adress-left {
display: block;
width: 95%;
margin-bottom: 2em;
}
.form-right {
display: block;
width: 95%;
float: left;
}
label.kontaktangabe {
display: block;
}
textarea.contact-form {
width: 379px;
}
dd,
dt {
display: block;
}
dd {
margin-bottom: 1em;
}
span.left {
font-weight: 700;
}
.kategorie .table-row {
margin-bottom: 2rem;
}
div#werdegang .table-row {
margin-bottom: 1em;
}
}
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Peter Schachnowskij – Homepage</title>
<link rel="stylesheet" href="css/portfolio.css">
</head>
<body>
<header>
<div class="header">
<h1>Peter Schachnowskij</h1>
<nav>
Startseite
Lebenslauf
Referenzen
Zeugnisse
<a class="active">Kontakt</a>
</nav>
</div>
</header>
<main>
<p> </p>
<h2>Kontakt</h2>
<div class="table-row" id="kontaktdaten">
<div class="adress-left">
<h3>Peter Schachnowskij</h3>
<p><address>Richterstraße 9<br>
70567 Stuttgart</address></p>
<p>
<dl><dt>Tel.:</dt>
<dd>01 76 / 21 75 17 11</dd>
</dl>
<dt>E-Mail: </dt>
<dd>peter.schachnowskij.gf#gmail.com</dd>
<p>
<p>
<dl><dt>Homepage:</dt>
<dd>noch im Aufbau</dd>
</dl>
<dl><dt>XING-Profil:</dt>
<dd>https://www.xing.com/profile/Peter_Schachnowskij</dd>
</dl>
</p>
</div>
<div class="form-right">
<h3>Haben Sie ein Anliegen?</h3>
<p>Schreiben Sie mir gerne!</p>
<form action="mailto:peter.schachnowskij.gf#gmail.com" method="post">
<div class="table-row"><label class="kontaktangabe" for="name">Ihr Name*: </label><input type="text" value size="50" aria-required="true" aria-invalid="false" /></div>
<div class="table-row"><label class="kontaktangabe" for="vorname">Ihr Vorname*: </label><input type="text" value size="50" aria-required="true" aria-invalid="false" /></div>
<div class="table-row"><label class="kontaktangabe" for="e-mail">Ihre E-Mail*: </label><input type="text" value size="50" aria-required="true" aria-invalid="false" /></div>
<div class="table-row"><label class="kontaktangabe" for="telefon">Ihr Telefon: </label><input type="text" value size="50" aria-required="false" aria-invalid="false" /></div>
<div class="table-row" id="nachricht"><label class="kontaktangabe" for="nachricht">Ihre Nachricht: </label><textarea name="your-message" cols="52" rows="12" class="contact-form" aria-invalid="false"></textarea></div>
<div class="table-row"><label class="kontaktangabe" for="absenden"> </label><button class="buttons" type="submit" name="action" id="absenden">Absenden</button></div>
</form>
<div class="empty-bottom"> </div>
</div>
</div>
</main>
<div class="empty-bottom"> </div>
<footer>
<div class="footer">
<div class="button">Peter Schachnowskij </div>
<div class="button">Richterstr. 9 </div>
<div class="button">70567 Stuttgart </div>
<div class="button">
<nobr>Tel.: 01 76 / 21 75 17 11</nobr>
</div>
<div class="button">
<nobr>E-Mail: peter.schachnowskij.gf#gmail.com</nobr>
</div>
</div>
</footer>
</body>
</html>
Can someone please help me? Thanx in previous.
Related
I am attempting to create a contact form for my online store and I ran into a bug, when I try to type inside my text fields the website won't allow me to do so.
I have tried a couple of things but they were not much help. I have yet to add any JavaScript but I am not sure if that is the root of my problem or if it's something simple.
* {
margin: 0;
padding: 0;
font-family: 'poppins', sans-serif;
box-sizing: border-box;
}
.hero {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
nav {
display: flex;
align-items: center;
}
nav .menu {
width: 50px;
margin-right: 20px;
cursor: pointer;
padding-bottom: 50px;
}
nav .logo {
width: 500px;
height: 200px;
object-fit: none;
padding-right: 80px;
padding-bottom: 55px;
}
nav ul {
flex: 1;
text-align: right;
margin-right: 20px
}
nav ul li {
display: inline-block;
list-style: none;
margin-right: 20px;
padding-bottom: 100px;
font-size: 25px;
margin: 0 20px;
}
nav ul a {
text-decoration: none;
color: #fff;
}
.lamp-set {
position: absolute;
top: -20px;
left: 22%;
width: 200px;
}
.lamp {
width: 100%;
}
.light {
position: absolute;
top: 97%;
left: 50%;
transform: translateX(-50%);
width: 700px;
margin-left: -10px;
opacity: 1;
}
.text-container {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-container h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-container p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.emails {
background: #00a8f3;
padding: 14px 40px;
display: inline-block;
color: #fff;
font-size: 25px;
margin-top: 30px;
margin-left: 50%;
border-radius: 30px;
}
.villian {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
.text-contact {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-contact h1 {
font-size: 50px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-shop h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
margin-left: 50%;
}
.text-contact p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.container {
display: flex;
align-items: center;
justify-content: center;
}
form {
background: #fff;
display: flex;
flex-direction: column;
padding: 2vw 4vw;
width: 90%;
max-width: 600px;
border-radius: 10px;
}
form h3 {
color: #555;
font-weight: 800;
margin-bottom: 20px;
text-decoration: none;
}
form input,
form textarea {
border: 0;
margin: 10px 0;
padding: 20px;
outline: none;
background: #f5f5f5;
font-size: 16px;
}
form button {
padding: 15px;
background: #00a8f3;
color: #fff;
font-size: 18px;
border: 0;
outline: none;
cursor: pointer;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
<div class="hero">
<nav>
<img src="menu.png" class="menu">
<img src="ovlogo.png" class="logo">
<ul>
<li><a href="index.html">Home</li>
<li><a href="contact.html">contact</li>
</ul>
</nav>
<div class="container">
<form>
<h3>Get in touch</h3>
<input type="text" id="name" placeholder="Your name" required>
<input type="email" id="email" placeholder="Email" required>
<input type="text" id="phone" placeholder="Phone number" required>
<textarea id="message" rows="4" placeholder="How can we assist you?"></textarea>
<button type="submit">Submit</button>
</form>
</div>
</div>
You forgot to close your a tag so the whole page was a link which means if you click on anything contained in that link (virtually everything below the tag), it will reload the page
Fix is to add </a> to close it.
contact
* {
margin: 0;
padding: 0;
font-family: 'poppins', sans-serif;
box-sizing: border-box;
}
.hero {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
nav {
display: flex;
align-items: center;
}
nav .menu {
width: 50px;
margin-right: 20px;
cursor: pointer;
padding-bottom: 50px;
}
nav .logo {
width: 500px;
height: 200px;
object-fit: none;
padding-right: 80px;
padding-bottom: 55px;
}
nav ul {
flex: 1;
text-align: right;
margin-right: 20px
}
nav ul li {
display: inline-block;
list-style: none;
margin-right: 20px;
padding-bottom: 100px;
font-size: 25px;
margin: 0 20px;
}
nav ul a {
text-decoration: none;
color: #fff;
}
.lamp-set {
position: absolute;
top: -20px;
left: 22%;
width: 200px;
}
.lamp {
width: 100%;
}
.light {
position: absolute;
top: 97%;
left: 50%;
transform: translateX(-50%);
width: 700px;
margin-left: -10px;
opacity: 1;
}
.text-container {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-container h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-container p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.emails {
background: #00a8f3;
padding: 14px 40px;
display: inline-block;
color: #fff;
font-size: 25px;
margin-top: 30px;
margin-left: 50%;
border-radius: 30px;
}
.villian {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
.text-contact {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-contact h1 {
font-size: 50px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-shop h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
margin-left: 50%;
}
.text-contact p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.container {
display: flex;
align-items: center;
justify-content: center;
}
form {
background: #fff;
display: flex;
flex-direction: column;
padding: 2vw 4vw;
width: 90%;
max-width: 600px;
border-radius: 10px;
}
form h3 {
color: #555;
font-weight: 800;
margin-bottom: 20px;
text-decoration: none;
}
form input,
form textarea {
border: 0;
margin: 10px 0;
padding: 20px;
outline: none;
background: #f5f5f5;
font-size: 16px;
}
form button {
padding: 15px;
background: #00a8f3;
color: #fff;
font-size: 18px;
border: 0;
outline: none;
cursor: pointer;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
<div class="hero">
<nav>
<img src="menu.png" class="menu">
<img src="ovlogo.png" class="logo">
<ul>
<li><a href="index.html">Home</li>
<li>contact</li>
</ul>
</nav>
<div class="container">
<form>
<h3>Get in touch</h3>
<input type="text" id="name" placeholder="Your name" required>
<input type="email" id="email" placeholder="Email" required>
<input type="text" id="phone" placeholder="Phone number" required>
<textarea id="message" rows="4" placeholder="How can we assist you?"></textarea>
<button type="submit">Submit</button>
</form>
</div>
</div>
I am trying to change tabs using bootstrap tab panels just like this example here: https://codepen.io/wizly/pen/BlKxo
This is my jsfiddle code with what I have tried to do: https://jsfiddle.net/u18vjL9a/2/
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a class="selected" href="#searchtab1"aria-controls="searchtab1" role="tab" data-toggle="tab">Search Catalog</a></li>
<li role="presentation">Search Databases</li>
<li role="presentation">Search Website</li>
</ul>
You didn't link Bootstrap CSS and JavaScript file.
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
And there's some wrong codes that break the rule of Bootstrap.
div.tab-content has wrong id that is the same with first tabpanel.
<div class="tab-content" id="searchtab1" style="display: block;">
<!-- should be: -->
<div class="tab-content">
tabpanels other than first one should not have .active. And there's irrelevant style display: none;.
<div role="tabpanel" class="tab-pane active" id="searchtab2" style="display: none;">
<!-- should be: -->
<div role="tabpanel" class="tab-pane" id="searchtab2">
Here's working snippet:
body {
font-size: 14px;
text-rendering: optimizeLegibility;
}
#catalogSearch>input[type=text]:nth-child(1) {
width: 60%;
}
.navbar-top ul.navbar-nav>li:nth-child(2) {
display: none;
}
.navbar {
border: 0px solid transparent;
border-radius: 0;
}
.navbar-top .navbar-nav>li>a {
padding: 8px 10px 8px 15px;
font-size: 12px;
font-weight: 700;
}
.dropdown-menu>li>a {
padding: 8px 10px 8px 15px;
color: #ffffff!important;
background-color: #5a8577!important;
white-space: nowrap;
font-size: 11px;
border-bottom: 1px dotted #a0c1b0;
font-weight: bold;
}
.dropdown-menu>li>a:hover {
color: #ffffff!important;
background-color: #76a394!important;
}
#navbar ul.dropdown-menu {
padding: 0;
border: 0px solid rgba(0, 0, 0, .15);
}
.navbar-nav {
margin: 0px -15px;
padding: 0 0 0 15px;
}
.nav-mobile .navbar-brand {
display: none;
}
/**BUTTON**/
.button {
text-decoration: none;
font-weight: 500;
padding: 10px 16px;
transition: all .25s ease;
}
.button:hover {
text-decoration: none;
}
/**HEADER**/
#idM6HJx {
border-bottom: 1px solid #efefef;
border-top: 3px solid #729f90;
}
#idzBDxO {
width: 50%;
float: left;
}
#idSaPI0 {
float: right;
}
/**hours widget div**/
#id1sZY4 {
float: left;
margin-left: 95px;
margin-top: 30px;
color: #D06F44;
max-width: 280px;
font-weight: bold;
font-size: 12px;
}
/**search widget div**/
#idVdBs6 {
max-width: 500px;
float: left;
}
#idnUKr8 {
float: right;
margin-bottom: 28px;
}
.headeraddress {
float: left;
display: block;
font-size: 14px;
color: #537b6f;
}
ul#menu-top-links.top_nav {
list-style: none;
}
ul.top_nav {
margin-bottom: 0;
float: right;
padding-inline-start: 0px!important;
}
ul.top_nav li {
float: left;
margin-left: 20px;
position: relative;
}
ul.top_nav li:first-child {
margin-left: 0px;
}
ul.top_nav li a {
color: #537b6f;
font-size: 12px;
font-weight: 600;
}
ul.top_nav li a:hover {
color: #9ebeb4;
}
#header .logo {
float: left;
width: 264px;
height: auto;
margin: 15px 0 15px;
}
.headerright {
max-width: 500px;
}
.floatright {
float: right;
}
.top_search {
float: right;
margin-top: 22px;
overflow: hidden;
max-height: 70px;
}
.searcht {
color: #3a3a3c;
display: block;
margin: 0;
padding: 0;
overflow: hidden;
}
.searcht ul {
margin: 0!important;
padding: 0!important;
list-style: none;
}
.searcht li {
list-style: none;
float: left;
text-align: center;
margin-right: 1px;
width: 130px;
}
.searcht ul a {
display: block;
padding: 2px 0;
text-decoration: none!important;
background: #729f90;
font-size: 14px;
text-align: center;
text-transform: capitalize;
font-weight: normal;
color: #FFF;
}
.searcht a.selected {
background: #5a8577;
}
.searcht ul li a:hover {
background: #9ebeb4;
}
#searchtab1,
#searchtab2,
#searchtab3 {
overflow: hidden;
}
.searchform {
display: inline;
margin: 0;
padding: 0;
}
#header input[type=text],
#header input[type=password],
#header input[type=email],
#header textarea {
font-family: arial, "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
}
.cataloginput {
border: 1px solid #3d6d6c;
color: #333;
float: left;
font-size: 12px;
font-weight: normal;
height: 22px!important;
line-height: 22px!important;
margin: 0;
outline: medium none;
padding: 0 0 0 4px;
width: 220px!important;
}
.catalogselect {
border: 1px solid #3d6d6c;
color: #333;
float: left;
font-size: 12px;
height: 24px!important;
line-height: 18px!important;
margin: 0 8px 0 -2px;
outline: medium none;
padding: 3px 1px 2px;
width: 100px;
}
#header select {
max-width: 90%;
}
.searchsubmit {
background-color: #fff;
border-style: none;
color: #5a8577;
float: right;
font-size: 12px;
font-weight: bold;
height: 24px;
line-height: 20px;
margin: 0;
width: 36px;
border: 1px solid #3d6d6c;
}
.searchsubmit:hover {
background-color: #D06F44;
cursor: pointer;
color: #FFF;
}
.searcht div {
padding: 5px;
clear: left;
background: #5a8577;
border-right: 0px solid #FFF;
max-width: 390px;
}
.databaseselect {
border: 1px solid #3d6d6c;
color: #333;
float: left;
font-size: 12px;
height: 24px!important;
line-height: 18px!important;
margin: 0;
outline: medium none;
padding: 3px 1px 2px;
width: 331px;
}
#searchtab3>form>input.searchinput {
width: 89%;
}
/**FOOTER**/
#default_footer {
display: none;
}
#footer {
margin: 0 auto;
}
.footerhours {
float: left;
text-align: left;
color: #f6f6f6;
}
.footer_bar_right {
float: right;
}
.footer_bar {
position: relative;
overflow: hidden;
background-color: #eaeaea;
padding-top: 5px;
padding-bottom: 5px;
}
.footer_bar a {
color: #fff;
margin-left: 10px;
height: 28px;
width: 28px;
text-indent: -9999px;
display: block;
float: right;
opacity: .8;
}
.footer_bar a:hover {
opacity: 1;
}
a.yahoo {
background: url(/images/tile//socials.png) no-repeat -56px 0;
height: 28px;
width: 28px;
}
a.google {
background: url(/images/tile//socials.png) no-repeat -84px 0;
height: 28px;
width: 28px;
}
a.twitter {
background: url(/images/tile//socials.png) no-repeat -28px 0;
height: 28px;
width: 28px;
}
a.facebook {
background: url(/images/tile//socials.png) no-repeat 0 0;
height: 28px;
width: 28px;
float: right;
text-indent: -99999px;
}
.wireless {
float: right;
text-align: right;
color: #f6f6f6;
}
.wireless img {
margin-top: -3px;
float: right;
margin-left: 10px;
margin-bottom: 20px;
}
.wireless a {
color: #fff;
}
/**EVENTS LISTING PAGE**/
/*Events listing title*/
.events-right>h1,
.events-grid>h1 {
font-size: 3.8em;
margin-top: 14px;
margin-bottom: 14px;
padding-bottom: 5px;
font-weight: 400;
}
#media (min-width: 768px) {
.events-right {
margin-left: 260px;
}
}
/*event listing date bar*/
.events-date-bar {
font-size: 1.6em;
margin-bottom: 1em;
font-weight: 600;
padding: 10px 0;
border-top: 1px solid #bbbbbb;
border-bottom: 1px solid #bbbbbb;
}
/*event listing title*/
.eelisttitle a {
font-weight: 600;
font-size: 1.2em;
margin-bottom: 0.5em;
text-decoration: none;
}
/*event listing date and time*/
div.eelisttime.headingtext {
color: #2c3e50!important;
}
/*event listing short description*/
.eelistdesc {
font-size: 1.2em;
}
.eventRegButton {
margin-bottom: 0.75em;
}
.events-day-title>.events-date-string>.headingtext,
.events-day-title>.events-date-range-string>.headingtext {
color: #56585B!important;
}
.events-left .tab-content {
background: #ffffff;
}
#media (max-width: 768px) {
.events-details {
margin-bottom: 20px;
}
}
/*filters*/
#eventsearch {
margin-bottom: 15px;
}
.events-filter-row {
padding: 1em 2em 1em 2em;
margin-bottom: 0px;
}
.events-view-row {
padding: 5px 40px;
}
#media (max-width: 768px) {
.events-filter-row {
max-width: 768px;
text-align: center;
}
}
/*filter buttons*/
#media (max-width: 768px) {
.events-views {
max-width: 768px;
margin-top: 10px;
text-align: center;
}
}
/**EVENT PAGES**/
/*border above and below the date, time and location info*/
#id4VX3g .amh-row,
#idlw5ZC.amh-row.row {
border-top: 1px solid #bbbbbb;
padding: 8px 0;
}
/*event page sub title*/
#idaiMWo h3 {
color: #56585B;
font-size: 1.8em;
;
font-weight: 400;
}
/*event page date*/
#idm0vRo h4 {
color: #2d3e4f;
}
/*event description*/
#idiga4D p {
color: #56585B;
}
/*event short description*/
#idjLXfv .custom1 {
color: #34485e;
margin: 1em 0 0.5em 0;
font-weight: 400;
font-size: 1.3em;
}
/**** Upcoming Events widget ****/
/*widget title*/
#idsqaCW h4 {
font-size: 1.8em;
margin-bottom: 0.5em;
font-weight: 400;
color: #1d1d1d;
}
/*height of events listing widget*/
#idtvR3F .amev-event-list {
height: 580px;
}
/*date string in upcoming events widget*/
.amev-event-time>.headingtext {
color: #000000 !important;
}
.amev-event-title a {
text-decoration: none;
}
.amev-event-description .eventRegButton {
font-size: 0.95em;
margin-bottom: 0.3em;
}
/*my events login page*/
.ammev-login {
margin: 20px auto;
}
.amPopup {
padding-bottom: 15px;
}
/** RESERVE **/
.amnp-holder {
padding: 15px;
}
#media (min-width: 768px) {
.navbar-nav>li {
float: none;
display: inline-block;
}
.navbar-nav {
float: none;
text-align: center;
}
}
#media (max-width: 991px) {
.footerhours {
float: none;
text-align: center;
font-size: 12px!important;
}
.footer_bar_right {
float: none;
width: 100%;
display: block;
text-align: center;
}
.footer_bar a {
float: none!important;
display: inline-block;
margin-right: 7px;
margin-left: 7px;
}
.wireless {
float: none;
display: block;
text-align: center;
width: auto;
font-size: 12px!important;
}
.wireless img {
float: none;
display: block;
text-align: center;
width: 44px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0;
margin-top: 5px;
}
}
#media (max-width: 989px) and (min-width: 768px) {
#header .logo {
float: left;
text-align: center;
width: 200px;
height: auto;
display: block;
margin-right: auto;
margin-left: auto;
}
#header .logo img {
max-width: 200px!important;
height: auto!important;
}
#ideeodQ {
width: 760px;
}
#id1sZY4 {
float: right;
margin: 30px 0 0;
display: inline-block;
width: 100%;
line-height: 16px;
font-weight: bold;
width: 240px;
font-size: 12px;
}
.headeraddress {
font-size: 12px;
}
}
#media (min-width: 768px) and (max-width: 1068px) {
.navbar-top .navbar-nav>li>a {
padding: 9px 7px;
font-size: 0.74em;
}
#id6b7GS {
float: right;
}
#idawjaN,
#id6b7GS {
width: 100%;
}
}
#media only screen and (max-width: 767px) and (min-width: 480px) {
#ideeodQ {
width: 470px;
}
#idzBDxO {
width: 100%;
float: none;
text-align: center;
}
#idSaPI0 {
float: none;
text-align: center;
}
#id6b7GS {
float: none;
text-align: center;
display: flex;
justify-content: center;
}
#header .logo {
float: left;
text-align: center;
width: 200px;
height: auto;
display: block;
margin-right: auto;
margin-left: auto;
}
#id1sZY4 {
float: right;
margin: 30px 0 0;
display: inline-block;
width: 100%;
line-height: 16px;
font-weight: bold;
width: 240px;
font-size: 12px;
}
#idnUKr8 {
float: none;
text-align: center;
margin-bottom: 0;
}
ul.top_nav {
margin-bottom: 0;
float: none;
text-align: center;
}
.floatright {
float: none;
}
#header .top_search {
float: none;
display: inline-block;
margin: 10px auto 20px;
max-height: 100px;
}
.headeraddress {
float: none;
font-size: 12px;
text-align: center;
}
}
#media only screen and (max-width: 479px) and (min-width: 200px) {
#idawjaN,
#id6b7GS {
width: 100%;
}
#id6b7GS {
float: none;
display: flex;
justify-content: center;
}
#ideeodQ {
width: 300px;
}
#idSaPI0 {
float: none;
text-align: center;
}
#idnUKr8 {
margin-bottom: 0px;
}
#idzBDxO {
width: 100%;
float: none;
}
#idVdBs6 {
max-width: 300px;
float: none;
}
#header .logo {
float: none;
text-align: center;
width: 200px;
height: auto;
display: block;
margin-right: auto;
margin-left: auto;
}
#header .logo img {
max-width: 200px;
height: auto;
}
#id1sZY4 {
float: none;
text-align: center;
margin: 0 0 0px;
display: inline-block;
width: 100%;
line-height: 16px;
font-weight: bold;
max-width: 100%;
font-size: 12px;
}
.headeraddress {
float: none;
font-size: 12px;
text-align: center;
}
ul.top_nav {
margin-bottom: 0;
float: none;
text-align: center;
}
.floatright {
float: none;
}
#header .top_search {
float: none;
display: block;
margin: 10px auto 20px;
max-height: 120px;
}
.searcht li {
width: 99px;
}
.searcht ul a {
padding: 4px 10px;
line-height: 16px;
}
.cataloginput {
width: 146px!important;
}
.catalogselect {
width: 80px;
}
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<div class="searcht">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a class="selected" href="#searchtab1" aria-controls="searchtab1" role="tab" data-toggle="tab">Search Catalog</a></li>
<li role="presentation">Search Databases</li>
<li role="presentation">Search Website</li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="searchtab1">
<form name="catalogSearch" target="_blank" method="post" action="" onsubmit="SubmitSearch()" class="searchform">
<input type="text" name="q" id="q" class="cataloginput" value="Enter keyword..." onfocus="if (this.value == 'Enter keyword...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Enter keyword...';}">
<select class="catalogselect" id="SearchBy">
<option selected="selected" value="KW">Any Field</option>
<option value="TI">Title</option>
<option value="AU">Author</option>
<option value="SU">Subject</option>
<option value="NOTE">General notes</option>
<option value="PUB">Publisher</option>
<option value="GENRE">Genre</option>
<option value="SE">Series</option>
<option value="ISBN">ISBN</option>
</select>
<input type="submit" name="btnG" class="searchsubmit" value="Go">
</form>
</div>
<div role="tabpanel" class="tab-pane" id="searchtab2">
<form class="searchform" action="" method="POST">
<select name="subjectid" class="databaseselect">
<option class="inputbox2" value="business-resources">Business Resources</option>
<option class="inputbox2" value="ematerials-ebooks-audio-books-videos">eMaterials - eBooks, Audio Books, Videos</option>
<option class="inputbox2" value="health-and-science-resources">Health and Science Resources</option>
<option class="inputbox2" value="history-and-geneaology-resources">History and Geneaology Resources</option>
</select>
<input class="searchsubmit" type="submit" value="Go">
<input type="hidden" name="catsearch" value="1">
</form>
</div>
<div role="tabpanel" class="tab-pane" id="searchtab3">
<form class="searchform" method="get" action="">
<input type="text" value="Search this Website..." name="s" class="searchinput" onfocus="if (this.value == 'Search this Website...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this Website...';}">
<input type="submit" class="searchsubmit" value="Go">
</form>
</div>
</div>
Good day, somehow my check box and the text that needs to be beside it do not align in the same row. I have the code on JS Fiddle.
https://jsfiddle.net/6ejwdg9v/
The checkbox code is:
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" name="agree" value="agree" /> Agree with the terms and conditions
</label>
</div>
</div>
the classes form-group and checkbox are not touched with custom css code which is why I wonder how are they affected.
EDIT: I added the code in the "duplicate of another question" it did not do anything I still need help
changed class for .checkbox added
vertical-align: middle;
width: 20px;
also added
input[type=checkbox] {
width: 20px;
}
#font-face {
font-family: 'brandon_reg';
src: url('../fonts/brandon-grotesque-light.otf');
}
#font-face {
font-family: 'brandon_med';
src: url('../fonts/brandon-grotesque-medium.otf');
}
#font-face {
font-family: 'brandon_black';
src: url('../fonts/brandon-grotesque-black.otf');
}
html {
font-size: 100%;
}
body {
margin: 0 auto;
display: block;
/*REGISTER BACKGROUND*/
background-position: center;
background-repeat: no-repeat;
background-size: cover;
/*REGISTER BACKGROUND*/
}
.regular_bg {
font-family: 'brandon_reg';
}
.med_bg {
font-family: 'brandon_med';
}
.sml_padding {
margin: -10;
padding: -10;
}
.thick_bg {
font-family: 'brandon_black';
}
.thick_bg2 {
font-size: 35px;
}
#media only screen and (max-width : 767px) {
.box {
height: auto !important;
}
}
.fadeIn {
-webkit-animation: animat_show 0.8s;
animation: animat_show 0.8s;
visibility: visible !important;
}
#-webkit-keyframes animat_show{
0%{opacity:0}
100%{opacity:1}
}
.btn-group-sm>.btn, .btn-sm {
float: none;
}
.navbar-toggle {
display: inline-block;
float: none;
}
.full_width {
height: auto;
width:100%;
}
.ul_login {
color: #00a6a6;
}
.ul_reg {
color: #f08300;
}
.justify_text {
transform: translateT(-50);
text-align: justify;
padding: 2%;
display: flex;
justify-content: center;
align-items: center;
}
/*
.row_center {
display: flex;
}
.row_center>* {
flex: 1;
}
*/
.center-block {
margin-left:auto;
margin-right:auto;
display:block;
}
.icon_text_padding {
padding-bottom: 20px;
align-items: center;
margin: 0 auto;
}
.fab {
padding: 20px;
font-size: 50px;
color: #FFF;
}
.fab:hover {
color: #c9c9c9;
text-decoration: none;
}
/*IMPORTANT CSS FOR HEADER*/
.nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100px;
padding: 10px 100px;
box-sizing: border-box;
transition: .5s;
}
.list1 {
float: left;
font-size: 200%;
}
.list2 {
float: right;
font-size: 200%;
}
.list2 li a:hover {
color: #fff;
}
/*
.lines {
position: relative;
padding: 10px 0;
}
.lines:before {
content: '';
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 10px;
top: 0;
left: 0;
width: 32%;
height: 1px;
background: #cfcfcf;
}
.lines:after {
content: '';
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
bottom: 0;
left: 0;
width: 32%;
height: 1px;
background: #cfcfcf;
}
.lines_med:before {
width: 24%;
}
.lines_med:after {
width: 24%;
}
.lines_med2:before {
width: 27%;
}
.lines_med2:after {
width: 27%;
}
.lines_long:before {
width: 38%;
}
.lines_long:after {
width: 38%;
}
*/
nav .logo {
float: left;
}
nav .logo img {
height: 80px;
transition: 5s;
}
nav ul {
float: left;
margin: 0;
padding: 0;
display: flex;
}
nav ul li {
list-style: none;
}
nav ul li a {
line-height: 80px;
color: #262626;
padding: 5px 20px;
text-decoration: none;
transition: .5s;
}
nav ul li a:hover {
color: #fff;
background: #00a6a6;
text-decoration: none;
}
footer {
width: 100%;
background-color: #00a6a6;
padding: 3%;
color: #FFF;
}
.carousel-control.left, .carousel-control.right {
background-image:none !important;
filter:none !important;
}
.container-fluid {
max-width: 1200px;
}
footer .container-fluid {
max-width: 100%;
}
.footer_links a h4 {
color: #fff;
}
.footer_links a:hover {
color: #fff;
text-decoration: underline;
}
.faq a:hover {
text-decoration: none !important;
}
.info_container {
max-width: 1920px;
width: 100%;
margin: 0 auto;
}
.info_box h2 {
text-align: center;
}
.info_header {
padding-top: 4%;
padding-bottom: 4%;
}
.bottom_padding {
padding-bottom: 4%;
}
.info_font {
font-size: 18px;
}
.mv_font {
font-size: 20px;
text-align: left;
}
.contact_font {
font-size: 20px;
text-align: center;
}
.center_font {
margin: 0 auto;
text-align: center;
}
#icon {
max-width: 90%;
}
#media (max-width: 600px){
#icon {
max-width: 150px;
}
h4 {
font-size: 1.7em;
}
}
/*CONTACT PAGE*/
.text_field_design {
padding: 50px 0 80px;
text-align: center;
}
.text_field_design p {
padding-bottom: 80px;
color: #737373;
}
.text_field_design h2 {
color: #4c4c4c;
margin: 20px 0 20px;
}
.text_field_design .input-group {
margin-bottom: 25px;
}
.input-group-addon {
padding: -50px !important;
font-size: 20px;
}
.text_field_design .form-control {
border-radius: 0 !important;
}
.text_field_design span {
border-radius: 0 !important;
}
.text_field_design .btn {
border-radius: 0;
width: 100%;
font-size: 15px;
background-color: #f08300;
color: #fff;
}
.text_field_design .btn:hover {
background-color: #f3a64c;
color: #fff !important;
}
.box_shadow {
box-shadow: 10px 10px 5px grey;
}
.curved_img {
border-radius: 10px;
}
/*REGISTER*/
.reg_box {
width: 90%;
padding: 70px 70px 10px;
background: #fff;
top: 50%;
left: 50%;
margin: 0 auto;
opacity: 0.9;
border-radius: 30px;
}
.reg_box p {
margin: 0;
padding: 0;
font-weight: bold;
}
.reg_box input {
width: 100%;
margin-bottom: 20px;
}
.reg_box input[type="text"], input[type="password"] {
border: none;
border-bottom: 1px solid #000;
background: transparent;
outline: none;
height: 40px;
}
.reg_box input[class="reg_signup"] {
font-family: 'brandon_med';
border: none;
outline: none;
height: 40px;
background: #f08300;
color: #fff;
font-size: 18px;
margin-top: 20px;
}
.reg_box input[class="reg_fb"] {
font-family: 'brandon_med';
border: none;
outline: none;
height: 40px;
background: #3b579d;
color: #fff;
font-size: 18px;
}
.reg_box input[class="reg_google"] {
font-family: 'brandon_med';
border: none;
outline: none;
height: 40px;
background: #2eaa52;
color: #fff;
font-size: 18px;
}
.checkbox {
float: left !important;
display: block;
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
vertical-align:middle;
}
/*
.register_form {
text-align: center;
margin: 100px 400px;
}
.registration {
width: 100%;
background-color: #fff;
opacity: 0.9;
padding: 50px 0px;
}
.align_left_reg {
text-align: left;
font-size: 18px;
}
#text_field {
width: 250px;
border-radius: 5px;
padding: 5px;
}
#phone {
width: 250px;
padding: 5px;
border-radius: 5px;
outline: 0px;
}
#rd {
font-family: 'brandon_med';
}
.button_container {
max-width: 60%;
}
.ref_button {
width: 100px;
height: 40px;
font-size: 18px;
background-color: #f08300;
color: #fff;
}
.fb_button {
width: 200px;
height: 40px;
font-size: 18px;
background-color: #3b579d;
color: #fff;
}
.fb_button:hover {
background-color: #3662d0;
}
.ref_button:hover {
background-color: #f3a64c;
color: #fff !important;
}
element.style {
color: white;
}
REGISTER*/
input[type=checkbox] {
width: 20px;
}
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My White Card</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body style="background-color:#000;" class="regular_bg">
<br><br>
<div class="reg_box">
<div class="row">
<div class="col-md-6">
<input type="submit" value="Sign Up With Facebook" class="reg_fb"></i>
</div>
<div class="col-md-6">
<input type="submit" value="Sign Up With Google" class="reg_google"></i>
</div>
</div>
<br>
<form>
<div class="row">
<div class="col-md-6 col-sm-12">
<p>First Name</p>
<input type="text" placeholder="First Name">
<p>Email</p>
<input type="text" placeholder="Email">
<p>Password</p>
<input type="password" placeholder="Password">
</div>
<div class="col-md-6 col-sm-12">
<p>Last Name</p>
<input type="text" placeholder="Last Name">
<p>Number</p>
<input type="text" placeholder="Number">
<p>Retype Password</p>
<input type="password" placeholder="Retype Password">
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" name="agree" value="agree" /> Agree with the terms and conditions
</label>
</div>
</div>
<input type="submit" value="Sign Up" class="reg_signup">
</div>
</form>
</div>
</body>
</html>
Turning the label into a flexbox will give you vertical alignment.
.checkbox label {
display: flex;
align-items: center; /* Vertical alignment */
}
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" name="agree" value="agree" /> Agree with the terms and conditions
</label>
</div>
</div>
I am trying to make a bottom sidebar with social media icons using float and clear properties. All of the icons are floated left, except for the twitter icon which is clearright. Why is the icon for twitter larger than the other icons? However, it is the same size when it's floated left.
I'd like for it to be the same size as the other icons and stay in that far right corner position. Or at least be centered without a lot of space in between the icons... How do I fix this? What am I doing wrong?
#import url('https://fonts.googleapis.com/css?family=Open+Sans|Poppins');
html {
font-size: 1em;
}
body {
background-color: white;
font-family: 'Open Sans', sans-serif;
}
/*logo*/
#logo {
float: left;
width: 5.5em;
background-color: white;
position: relative;
top: -2em;
}
/*pagewrapper*/
.pageWrapper {
width: 1000px;
margin: 0 auto;
padding: 2em;
margin-top: 1.5em;
margin-bottom: 1.5em;
border-style: double;
border-width: thick;
border-color: #7BDFF2;
overflow: auto;
}
/*menu*/
#nav_menu ul {
list-style-type: none;
}
#nav_menu ul li {
float: left;
margin-left: 6em;
margin-right: 4em;
}
#nav_menu li a {
text-align: center;
display: block;
width: 9em;
padding: .9em 0;
text-decoration: none;
background-color: #7BDFF2;
color: #eff7f6;
font-weight: bold;
border-radius: 1em;
}
#nav_menu li a:hover {
color: #f7d6e0;
}
#nav_menu li a:active {
color: #b2f7ef;
}
a {
text-transform: uppercase;
font-weight: bold;
color: #f2b5d4;
}
a:active {
color: #ffcdee;
}
a:hover {
color: #eff7f6;
}
/*copyright*/
footer {
text-align: center;
font-weight: 100;
font-size: .7em;
}
/* aside */
#socialmedia {
width: 80%;
margin: 0 auto;
margin-top: 2em;
}
#socialmedia h3 {
text-transform: lowercase;
color: #fff;
margin: 0 auto;
background-color: #f2b5d4;
letter-spacing: .9em;
font-size: .8em;
width: 100%;
height: 100%;
border-style: dotted;
border-color: #eff7f6;
text-align: center;
border-width: thin;
}
#socialmedia img {
width: 10%;
height: auto;
}
/*youtube embed video*/
.video iframe,
.video object,
.video embed {
display: block;
margin: 0 auto;
top: 0;
left: 0;
padding-top: 1em;
clear: both;
}
h1 {
font-weight: bold;
text-align: center;
font-size: 2em;
position: relative;
right: .5em;
bottom: -2em;
}
h2 {
font-weight: 200;
text-align: left;
}
.member {
margin-top: 3em;
}
.p album {
margin-top: .3em;
}
/*albums*/
.album {
border: dotted #000 .2em;
border-radius: .5em;
width: 20em;
min-height: 20em;
font-size: 1em;
margin-top: 5em;
margin: 1em;
padding: 1em;
}
#album img {
height: auto;
max-width: 100%;
}
/*floats and clears*/
.left {
float: left;
}
.right {
float: right;
}
.clearleft {
clear: left;
}
.clearright {
clear: right;
}
.clearboth {
clear: both;
}
<aside id="socialmedia">
<h3>social media</h3>
<div class="ig left">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2016/240/iconmonstr-instagram-13.png" alt="instagram logo">
</div>
<div class="fb left">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2012/240/iconmonstr-facebook-3.png" alt="facebook logo">
</div>
<div class="yt left">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2013/240/iconmonstr-youtube-8.png" alt="youtube logo">
</div>
<div class="twt clearright">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2012/240/iconmonstr-twitter-3.png" alt="twitter logo">
</div>
</aside>
You can make them 10% wide with 20% margin between the first three. 10% x 4 = 40%. 20% * 3 = 60%. 40% + 60% = 100%
#import url('https://fonts.googleapis.com/css?family=Open+Sans|Poppins');
html {
font-size: 1em;
}
body {
background-color: white;
font-family: 'Open Sans', sans-serif;
}
/*logo*/
#logo {
float: left;
width: 5.5em;
background-color: white;
position: relative;
top: -2em;
}
/*pagewrapper*/
.pageWrapper {
width: 1000px;
margin: 0 auto;
padding: 2em;
margin-top: 1.5em;
margin-bottom: 1.5em;
border-style: double;
border-width: thick;
border-color: #7BDFF2;
overflow: auto;
}
/*menu*/
#nav_menu ul {
list-style-type: none;
}
#nav_menu ul li {
float: left;
margin-left: 6em;
margin-right: 4em;
}
#nav_menu li a {
text-align: center;
display: block;
width: 9em;
padding: .9em 0;
text-decoration: none;
background-color: #7BDFF2;
color: #eff7f6;
font-weight: bold;
border-radius: 1em;
}
#nav_menu li a:hover {
color: #f7d6e0;
}
#nav_menu li a:active {
color: #b2f7ef;
}
a {
text-transform: uppercase;
font-weight: bold;
color: #f2b5d4;
}
a:active {
color: #ffcdee;
}
a:hover {
color: #eff7f6;
}
/*copyright*/
footer {
text-align: center;
font-weight: 100;
font-size: .7em;
}
/* aside */
#socialmedia {
width: 80%;
margin: 0 auto;
margin-top: 2em;
}
#socialmedia h3 {
text-transform: lowercase;
color: #fff;
margin: 0 auto;
background-color: #f2b5d4;
letter-spacing: .9em;
font-size: .8em;
width: 100%;
height: 100%;
border-style: dotted;
border-color: #eff7f6;
text-align: center;
border-width: thin;
}
#socialmedia img {
max-width: 100%;
height: auto;
}
/*youtube embed video*/
.video iframe,
.video object,
.video embed {
display: block;
margin: 0 auto;
top: 0;
left: 0;
padding-top: 1em;
clear: both;
}
h1 {
font-weight: bold;
text-align: center;
font-size: 2em;
position: relative;
right: .5em;
bottom: -2em;
}
h2 {
font-weight: 200;
text-align: left;
}
.member {
margin-top: 3em;
}
.p album {
margin-top: .3em;
}
/*albums*/
.album {
border: dotted #000 .2em;
border-radius: .5em;
width: 20em;
min-height: 20em;
font-size: 1em;
margin-top: 5em;
margin: 1em;
padding: 1em;
}
#album img {
height: auto;
max-width: 100%;
}
/*floats and clears*/
.left {
float: left;
}
.right {
float: right;
}
.clearleft {
clear: left;
}
.clearright {
clear: right;
}
.clearboth {
clear: both;
}
.icons:last-child {
justify-content: center;
}
#socialmedia > div {
float: left;
width: 10%;
}
#socialmedia > div:not(:last-child) {
margin-right: 20%;
}
<aside id="socialmedia">
<h3>social media</h3>
<div class="ig">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2016/240/iconmonstr-instagram-13.png" alt="instagram logo">
</div>
<div class="fb">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2012/240/iconmonstr-facebook-3.png" alt="facebook logo">
</div>
<div class="yt">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2013/240/iconmonstr-youtube-8.png" alt="youtube logo">
</div>
<div class="twt">
<img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2012/240/iconmonstr-twitter-3.png" alt="twitter logo">
</div>
</aside>
Update:
I'm sure this will be easy fix for advanced members. I have created drop down menu with the 'nav' element. For some reason as hard as I try, I cannot get the menu to overlap the slider images below it when you expand it on mobile. I've tried lowering the Z-index on the slider and raising it on the menu. What am I doing wrong? Thanks in advance:
UPDATE: Here is a fiddle link as requested by a comment which includes the HTML. https://jsfiddle.net/wknow6cv/#&togetherjs=ADxkd31O6q
#import 'https://fonts.googleapis.com/css?family=Alegreya+Sans';
* {
margin: 0;
padding: 0;
border: 0;
overflow-x: hidden;
}
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
body {
background: #F5F5F5;
color: #67727A;
font-family: 'Alegreya', Sans-serrif;
margin: 0;
}
h3 {
font-size: 150%;
line-height: 155%;
padding: 5% 0;
font-weight: 400;
}
p{
font-size: 120%;
line-height: 150%;
padding: 3%;
text-indent: 2%;
text-align: center;
}
img{
max-width: 100%;
height: auto;
width: auto;
margin-bottom: -4px;
}
header{
background-color: #6991AC;
width: 100%;
height: 120px;
}
h1{
position:absolute;
right: 600px;
top:30px;
}
#top-left-menu {
right: 0px;
}
#logo{
margin: 20px;
float: left;
width: 380px;
height: 60px;
background: url(img/RD.png) no-repeat center;
left: 0px;
top: 0px;
}
p {
font-size: 1.4vw;
}
h3{
font-size: 1.5vw;
}
/*--- Start Navigation --*/
nav{
float: right;
padding: 25px 20px 0 0; /*--top right bottom left--*/
}
#menu-icon{
display: hidden;
width: 40px;
height: 40px;
background: url(img/nav.png) center;
}
a:hover#menu-icon {
border-radius: 4px 4px 0 0;
}
ul{
list-style-type: none;
}
nav ul li {
font-family: 'Alegreya Sans', Sans-serrif;
font-size: 150%;
display: inline-block;
/*makes the links go left from right instead of up and down*/
float: left;
padding: 10px;
}
nav ul li a {
text-decoration: none;
color: #F5F5F5;
}
nav ul li a:hover {
color: #C3D7DF;
}
/*.current{
color: #C3D7DF;
}
/*--End Navigation--*/
.one-fourth {
width: 25%;
float: left;
text-align: center;
font-family: Arial;
color: #F0F0F0;
}
#cloud {
background-color: #C3D7DF;
}
#lock {
background-color: #6991AC;
}
#headset {
background-color: #C3D7DF;
}
#truck {
background-color: #6991AC;
}
.one-fourth i { /*--Icons at one fourth blocks--*/
color: #F0F0F0;
font-size: 410%;
padding: 13% 0 4% 0;
}
article {
float: left;
margin: 0 auto;
width: 50%;
height: auto;
}
#sec-1 {
background-color: #FFFFFF;
}
aside {
float: right;
margin: 0 auto;
width: 50%;
height: auto;
}
.one-third {
width: 33.3333333%;
float: left;
text-align: center;
color: #FFFFFF
}
#google{
background-color: #A2B1C1;
}
#marketing {
background-color: #BEB9AD;
}
#customers {
background-color: #AADCD2;
}
/*--Start Footer--*/
footer {
background-color: #4682B4;
width: 100%;
}
.social {
list-style-type: none;
text-align: center;
}
.social li {
display: inline;
}
.social i { /*--icons--*/
font-size: 220%;
padding: 3% 3% 3% 2%;
color: #C3D7DF;
}
.social i:hover {
color: F5F5F5;
}
footer.second { /*--Socket--*/
border-top: 1px solid #AADCD2;
background-color: #544B59;
max-height: 55px;
text-align: center;
margin: 0;
}
footer.second p {
padding: 5px 0 9px 0;
text-align: center;
}
.carouselbox {
font-family: helvetica,sans-serif;
font-size: 14px;
width: 100px;
position: relative;
margin: 1em;
border: 1px solid #ccc;
box-shadow: 2px 2px 10px #ccc;
overflow: hidden;
}
.content {
margin: 0;
padding: 0;
}
.content li {
font-size: 100px;
margin: 0;
padding: 0;
width: 100%;
list-style: none;
text-align: center;
}
.new-inner {
height: 800px;
width: 100%;
float: left;
background-color: #FFFAFA;
font-family: Arial;
}
.nip1 {
width: 40%;
}
/*---------Insert Slideshow stuff below------*/
.cycle-slideshow{
width: 100%;
display: block;
position: relative;
margin: 0 auto;
overflow: hidden;
}
.cycle-prev, .cycle-next {
font-size: 200%;
color: #FFF;
top: 50%;
display: block;
position: absolute;
z-index: 9999;
cursor: pointer;
}
.cycle-prev {left: 10%;}
.cycle-next {right: 10%}
.cycle-pager{
width: 100%;
text-align: center;
display: block;
position: absolute;
bottom: 20px;
z-index: 9999;
cursor: pointer;
}
.cycle-pager span {
text-indent: 100%;
white-space: normal;
width: 12px;
height: 12px;
display: inline-block;
border: 1px solid #FFF;
border-radius: 50%;
margin: 0 10px;
}
.cycle-pager .cycle-pager-active {background: #FFF;}
/*------------MEDIA QUERIES ARE NOW STARTING-------------*/
#media screen and (max-width: 768px){
p {
font-size: 250%;
}
h3{
font-size: 260%;
}
header{
width: 100%;
}
#logo {
margin: 15px 0 20 -25px;
background: url(img/RD_mobile.png) no-repeat center;
float: left;
width: 170px;
height: 60px;
}
#menu-icon {
display: inline-block;
}
nav ul, nav:active ul {
display: none;
z-index: 1000;
position: absolute;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}
nav:hover ul {
display: block;
}
nav li {
text-align: center;
width: 100%;
padding: 10px 0;
}
.one-fourth {
float: left;
width: 100%;
font-size: 30%;
}
.one-fourth i {
font-size: 500%;
padding: 4% 0 1% 0;
}
article {
width: 100%;
}
aside {
width: 100%;
}
.hand-mobile {
display: none;
}
.social i {
font-size: 100%;
}
}
Maybe try to change the media queries nav to position: relative;
EDIT:
Try this instead, change the display: none to inline:
nav ul, nav:active ul {
display: inline;
z-index: 1000;
position: relative;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}