Remove feint border around input (mobile) - html

Hello everybody & anybody who stumbles upon this!
I have ran into an issue where only on mobile devices there appears to be a feint border around my input tags elements. This happens in safari & google chrome on mobile. This does not happen in live server locally. It looks like its trying to create a border-radius: 20px around my input elements but in the css styling for desktop I don't even have that styling applied.
I have tried directly reapplying the desired styling in the mobile media query but everything I have tried has not worked so far.
Thank you in advance!! (p.s really sorry for the way the snippet is compiled, this was written using sass/scss.)
html, body {
font-family: 'mitr', sans-serif;
}
#contact {
background-color: rgba(66, 76, 96, 0.8);
padding: 2rem;
}
#contact .container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
#contact .container .contact-title h1 {
color: #a3bfd9;
font-size: 4rem;
font-weight: 600;
text-align: center;
}
#contact .container .contact-title p {
color: #fff;
font-size: 1.5rem;
font-weight: 300;
}
#contact .container .contact-title p a {
color: #a3bfd9;
text-decoration: underline;
}
#contact .container .form form {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
#contact .container .form form input {
border: none;
border-bottom: 3px #fff solid;
background: transparent;
color: #fff;
margin: 3rem 0;
padding: 0.5rem 0;
width: 600px;
font-size: 1.2rem;
font-weight: 500;
}
#contact .container .form form input::placeholder {
color: #fff;
}
#contact .container .form form input:focus {
outline: none;
}
#contact .container .form form button {
color: #fff;
background-color: #2675a6;
border: none;
border-radius: 50px;
padding: 1.5rem;
width: 250px;
font-size: 1.3rem;
}
#contact .container .form form button i {
position: relative;
margin-right: 0.5rem;
}
#contact .container .form form button:hover {
background-color: #a3bfd9;
color: #283040;
}
<section id="contact">
<div class="container">
<div class="contact-title">
<h1>Lets Chat</h1>
<p>Alternatively, you can reach out to me via Linkedin</p>
</div>
<div class="form">
<form action="https://formsubmit.co/your#email.com" method="POST">
<input type="text" name="name" required placeholder="name">
<input type="email" name="email" required placeholder="email">
<input type="text" name="message" required placeholder="message">
<button type="submit"><i class="fas fa-paper-plane"></i>Send</button>
</form>
</div>
</div>
</section>

i fixed it.. really happy I figured it out on my own!! little stuff like this, although trivial make me doubt my skills (i've only been working with html & css for 3 months). super simple, and disappointed that i actual wrote this question up but i won't delete it. i'll leave it up to remind myself to experiment just a little bit more before i ask for help.
changing border-radius: none to border-radius: 0; within my media query fixed it.
.form {
form {
input {
width: 300px;
font-size: 17px;
border-bottom: 3px solid #fff;
border-radius: 0;
}
button {
padding: 1rem;
font-size: 16px;
}
}
}

Related

Wording not appearing on button in HTML/ CSS

I am creating a footer in HTML/CSS and I am trying to create an email form at the bottom of the footer. I have already created the button and form itself; however, the wording on the button does not appear.
Here is my HTML code:
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.footer-container {
background-color: #212329;
padding-bottom: 20px;
width: 80%;
height: 40vh;
display: flex;
justify-content: center;
flex-wrap: wrap;
margin: 0 auto;
}
.footer-container h4 {
color: #fff;
text-align: left;
text-shadow: 0.5px 0.5px gray;
}
.footer-container h6 {
color: #fff;
text-shadow: 0.5px 0.5px gray;
}
.footer-heading {
display: flex;
flex-direction: column;
margin-right: 4rem;
}
.footer-heading h6 {
color: #fff;
margin-bottom: 2rem;
}
.footer-heading a {
color: #fff;
text-decoration: none;
margin-bottom: 0.5rem;
}
.footer-heading a:hover {
color: darkgoldenrod;
transition: 0.5s ease-in-out;
}
.email-form h4 {
margin-bottom: 2rem;
}
#footer-email {
width: 250px;
height: 40px;
border-radius: 4px;
outline: none;
border: none;
padding-left: 0.5rem;
font-size: 1rem;
margin-bottom: 1rem;
}
#footer-email::placeholder {
color: #b1b1b1;
}
#footer-email-btn {
width: 100px;
height: 40px;
border-radius: 4px;
background-color: darkred;
outline: none;
border: none;
color: #fff;
font-size: 1rem;
}
#footer-email-btn:hover {
cursor: pointer;
background-color: darkgoldenrod;
transition: all 0.4s ease-in-out;
}
<section class="footer-container">
<h4>Golden Lion Insurance Services</h4>
<div class="footer-heading">
<h6>About Golden Lion</h6>
About Rose
Rose Income Tax Services
</div>
<div class="footer-heading">
<h6>Services</h6>
Auto
Home
Truck
Health
Commercial
Life
Bonds
Annuities
</div>
<div class="footer-heading">
<h6>Resources</h6>
Blog
</div>
<div class="footer-heading">
<h6>Contact Us</h6>
</div>
<div class="footer-heading"></div>
<div class="email-form">
<h4>Get Your Latest Insurance Tips from Us!</h4>
<input type="email" placeholder="Enter your email here" id="footer-email">
<button type="submit" value="Sign Up!" id="footer-email-btn"></button>
</div>
</section>
Perhaps I may have missed some coding on the CSS, but the wording "sign up!" doesn't appear when I launch the code on my browser (I am using the current version of Google Chrome). Any help or pointers?
Thanks again!
The Problem seems to be in your HTML file on the 3rd line from the bottom.
When you declare a button, you need to mention some innerText in it.
For Example: <button> innerText </button>
Similarly for your code:
<button type="submit" value="Sign Up!" id="footer-email-btn">Sign Up!</button>
No worries, you only need to add some text inside the bottom tag.
Update your HTML button tag as the following
<button type="submit" value="Sign Up!" id="footer-email-btn">Submit</button>

Input and button not aligned horizontally

I'm making an email form where people can submit their emails and be part of an email list, in order to do this I have made an input and a button that go side by side. The issue that I am getting is that even though the button and inputs are the exact same height, and should be aligned horizontally perfectly it instead has a pixel difference with the button being a pixel higher than the input. How can I fix this?
#form {
display flex;
align-items: center;
justify-content: center;
flex-direction: row;
}
.email-form {
padding: 60px;
margin-top: 85px;
color: #fff;
background: #000;
text-align: center;
}
.form input {
width: 300px;
height: 30px;
margin: 0;
display: inline;
outline: 0 none;
}
.form button {
height: 30px;
width: 90px;
margin: 0;
background: #707070;
color: #fff;
font-weight: 700;
text-transform: uppercase;
text-align: center;
border: none;
cursor: pointer;
display: inline;
outline: 0 none;
}
<div class="form">
<form action="" id="email">
<input type="email" placeholder="Email" /><button type="submit" class="submit"><p>Sign up</p></button>
</form>
</div>
If you change
<p>Sign up</p>
To
<div>Sign up</div>
Or just
Sign up
It should work.
There's a bunch of margin settings on the <p> element that are overflowing and messing up your alignment.
Just remove p tag around the Sign up text.
<button type="submit" class="submit">Sign up</button>
#form {
display flex;
align-items: center;
justify-content: center;
flex-direction: row;
}
.email-form {
padding: 60px;
margin-top: 85px;
color: #fff;
background: #000;
text-align: center;
}
.form input {
width: 300px;
height: 30px;
margin: 0;
display: inline;
outline: 0 none;
}
.form button {
height: 30px;
width: 90px;
margin: 0;
background: #707070;
color: #fff;
font-weight: 700;
text-transform: uppercase;
text-align: center;
border: none;
cursor: pointer;
display: inline;
outline: 0 none;
}
<div class="form">
<form action="" id="email">
<input type="email" placeholder="Email" />
<button type="submit" class="submit">Sign up</button>
</form>
</div>

HTML+CSS: How do I put this 2 buttons at the same level vertically

I want to align those two buttons (Login and Registrar) at the same level but as they are different forms "Registrar" button is being placed on the "next line".
Here is the issue, visually:
Here is the code:
HTML
<section class="header_form_login">
<form action="index2.html" method="GET">
<label for="user">Usuario:<br></label>
<input type="text" id="user" name="user_input">
<label for="pass"><br>Contraseña:<br></label>
<input type="text" id="pass" name="pass">
<input type="submit" id="login" value="Login">
</form>
<form action="registro.html" method="GET">
<input type="submit" id="register" value="Registrar">
</form>
</section>
CSS:
header > section.header_form_login{
font-weight: 500;
align-items: right;
padding: 5px;
margin: auto;
margin-right: 20px;
}
header > section.header_form_login > form > input#user{
width: 200px;
height: 24px;
border: 1px solid lightgray;
}
header > section.header_form_login > form > input#pass{
width: 200px;
height: 24px;
border: 1px solid lightgray;
}
/* BUTTONS */
header > section.header_form_login > form > input#login{
border: none;
background-color: #CAB99F;
color: black;
font-weight: 500;
font-family: 'Roboto';
font-size: 15px;
text-decoration: none;
padding: 10px 20px;
cursor: pointer;
display: block;
margin-top: 10px;
}
header > section.header_form_login > form > input#register{
border: none;
background-color: #CAB99F;
color: black;
font-weight: 500;
font-family: 'Roboto';
font-size: 15px;
text-decoration: none;
padding: 10px 30px;
cursor: pointer;
display: flex;
float: right;
margin-top: 10px;
}
Thanks a lot!!!
PD: Feel free to give me recommendations, I'm kinda new to html and css coding.
I need help with html and css, specifically, with buttons being placed at the same level vertically but from different forms
Update: Refactored CSS to share styles.
I would restructure your HTML and fix your CSS to get things working properly. Also, when using ids, they are meant to be unique, so there's no need for a long lookup query such as:
header > section.header_form_login > form > input#login { … }
Just use
#login { … }
To make the "buttons" align, I made the register input a link. This is pretty standard. Then I added some CSS to align these elements on the same line.
.form-buttons {
display: flex;
flex-wrap: nowrap;
}
Here is how I could restructure your markup and styles.
* {
box-sizing: border-box;
}
body {
margin: 0;
}
.header_form_login {
font-weight: 500;
padding: 5px;
margin: auto;
width: 250px;
max-width: 100%;
}
#user,
#pass {
width: 100%;
padding: 5px;
border: 1px solid lightgray;
}
/* BUTTONS */
#login,
#register {
border: none;
background-color: #CAB99F;
color: black;
font-weight: 500;
font-family: 'Roboto';
font-size: 15px;
text-decoration: none;
padding: 10px 20px;
cursor: pointer;
text-align: center;
flex: 1;
}
#login {
margin-right: 2.5px;
}
#register {
margin-left: 2.5px;
}
.form-buttons {
padding-top: 10px;
display: flex;
flex-wrap: nowrap;
}
<section class="header_form_login">
<form action="index2.html" method="GET">
<label for="user">Usuario:<br></label>
<input type="text" id="user" name="user_input">
<label for="pass">Contraseña:</label>
<input type="text" id="pass" name="pass">
<div class="form-buttons">
<input type="submit" id="login" value="Login">
Register
</div>
</form>
</section>
jsFiddle
I don't generally like there being two forms in the same place to drive 2 actions. Assuming that you don't need username and password sending to your register page, then I would implement as follows:
<section class="header_form_login">
<form action="index2.html" method="GET">
<label for="user">Usuario:<br></label>
<input type="text" id="user" name="user_input">
<label for="pass"><br>Contraseña:<br></label>
<input type="text" id="pass" name="pass">
<input type="submit" id="login" value="Login">
Registrar
</form>
</section>
CSS for Buttons:
/* BUTTONS */
header > section.header_form_login > form > input#login{
border: none;
background-color: #CAB99F;
color: black;
font-weight: 500;
font-family: 'Roboto';
font-size: 15px;
text-decoration: none;
padding: 10px 20px;
cursor: pointer;
display: inline-block;
margin-top: 10px;
}
header > section.header_form_login > form > input#register{
border: none;
background-color: #CAB99F;
color: black;
font-weight: 500;
font-family: 'Roboto';
font-size: 15px;
text-decoration: none;
padding: 10px 30px;
cursor: pointer;
display: inline-block;
margin-top: 10px;
}

background-color doesn't work when using flexbox

I started using flexbox for my footers and now on all of my pages with forms the background-color is now the default white. Here is an example of one of my pages:
login.php
body {
background-color: #211e1e;
display: flex;
flex-direction: column;
height: 95vh;
}
h1 {
color: #99cc00;
text-align: center;
}
.content {
flex: 1 0 auto;
}
footer {
text-align: center;
font-weight: lighter;
color: #99cc00;
font-size: 10px;
flex-shrink: 0;
}
h3 {
position: absolute;
font-weight: bold;
color: #99cc00;
font-size: 15px;
width: 100%;
top: 91.5%;
}
.button {
background-color: #211e1e;
color: white;
font-size: 24px;
/*padding: 15px 50px;*/
transition-duration: .4s;
border: greenyellow;
width: 250px;
/* width of button */
height: 50px;
/* height of button */
}
.buttonColor:hover {
color: black;
background-color: greenyellow;
}
h1 {
text-align: center;
bottom: 25%;
}
content {
align-items: center;
justify-content: center;
}
.signin {
color: #99cc00;
margin: auto;
font-size: 24px;
}
.loginInput {
font-size: 24px;
}
.loginButton {
background-color: #211e1e;
color: white;
font-size: 24px;
padding: 10px 50px;
transition-duration: .4s;
border: greenyellow;
}
.loginButtonColor:hover {
color: black;
background-color: greenyellow;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="../../favicon.ico">
<meta charset="UTF-8">
<title>TapLovers</title>
<link rel="stylesheet" href="../background.css">
<link rel="stylesheet" href="login.css">
</head>
<body>
<div class=content>
<h1><img src="../../36x36-icon.png">apLovers</h1>
<form class="signin">
<input type="text" email="email" placeholder="Email" class="loginInput"><br>
<input type="text" password="password" placeholder="Password" class="loginInput"><br>
<input type="submit" name="submit" id="login" class="loginButton loginButtonColor" value="Login To TapLovers!" /><br><br>
<a href="../register/register.php">
<font color="#99cc00">Create a FREE TapLovers Account!</font>
</a>
</form>
</div>
<footer>
<h3><img src="../../favicon.ico">apLovers</h3><br>&copy 2018 TapLovers, All Rights Reserved
</footer>
</body>
</html>
Also I was trying to center my forms and my title using flexbox as well and I haven't gotten that working either. I'm not really sure what other details would be useful for this particular problem. If you need any more details just reply below and I'll answer them as they come out.
EDIT: The snippet that compiles on stack overflow shows my background just fine. What's more is if I use ctrl+shift+i on my page then the background works but if I just reload on my page then the background will turn white.
I did not see the issue with background fluctuations. I think it is a delay in the page load. I have added comments to help with the flexbox centering of items.
/*CSS reset of browser agent. Removes the horizontal scroll currently happening in page.*/
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: #211e1e;
display: flex;
flex-direction: column;
/* No need to restrict the height.
height: 95vh;*/
}
h1 {
color: #99cc00;
text-align: center;
}
.content {
flex: 1 0 auto;
/*make the content div flex so that the form can take the center alignment from flexbox properties. Add the centering here and avoid the margin: auto property */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
footer {
text-align: center;
font-weight: lighter;
color: #99cc00;
font-size: 10px;
flex-shrink: 0;
}
h3 {
position: absolute;
font-weight: bold;
color: #99cc00;
font-size: 15px;
width: 100%;
top: 91.5%;
}
.button {
background-color: #211e1e;
color: white;
font-size: 24px;
/*padding: 15px 50px;*/
transition-duration: .4s;
border: greenyellow;
width: 250px;
/* width of button */
height: 50px;
/* height of button */
}
.buttonColor:hover {
color: black;
background-color: greenyellow;
}
h1 {
text-align: center;
bottom: 25%;
}
/*Add flexbox style the inputs as blocks and remove <br> from HTML*/
.signin {
color: #99cc00;
font-size: 24px;
display: flex;
flex-direction: column;
}
.signin>* {
margin: 5px 0;
}
.loginInput {
font-size: 24px;
}
.loginButton {
background-color: #211e1e;
color: white;
font-size: 24px;
padding: 10px 50px;
/*Please check your animation ??
transition-duration: .4s;*/
/*add border size and transparency 1px solid*/
border: 1px solid greenyellow;
}
.loginButtonColor:hover {
color: black;
background-color: greenyellow;
}
<div class="content">
<h1><img src="../../36x36-icon.png">apLovers</h1>
<form class="signin">
<input class="loginInput" placeholder="Email" type="text"> <input class="loginInput" placeholder="Password" type="text"> <input class="loginButton loginButtonColor" id="login" name="submit" type="submit" value="Login To TapLovers!"> <font color="#99CC00">Create a FREE TapLovers Account!</font>
</form>
</div>
<footer>
<h3><img src="../../favicon.ico">apLovers</h3>
<p>© 2018 TapLovers, All Rights Reserved</p>
</footer>

Css align div one line [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I trying to align this code
to get something like
how to write right syntax, to do right peace of code showing in picture, align to look like in picture?
Here's an updated Fiddle that gets you a little closer to what you need. So what did I do?
First, your HTML needs a lot of cleaning up. I did a small amount, but I would suggest that you spend some time going through it, indenting things correctly, and breaking it into logical sections.
For the right hand side, I broke each row into its own div to logically separate them. This makes it easier to style consistently.
The controls in each row were given fixed pixel widths to help with alignment. A bit of a hack, but in this case it works.
#starikovs suggests using Flexbox, which is something you should research further. I would also suggest you spend some time learning about how to structure your HTML cleanly first. The fiddle I linked to here is only a quick cleanup!
Edit
In the interests of keeping everything in one place, I've copied the code here:
HTML
<form id=fbid26588961 name=fbid26588961>
<div class="full-info_auction-operations">
<div class="full-info_auction-buy">
<div class="auction-value">
BuyNow
<span>5394 €</span>
</div>
<input disabled id=buynow1 onclick="newcmd('cmd.asp?op=buynow&carid=26588961');" type=button value="BuyNow">
</div>
<div class="full-info_auction-raise">
<div class="auction-value">
Current Price
<span>900 €</span>
</div>
<input type=button style="font-size:10px;" value="+100" onclick="pliusZZ(100);">
<input type=button style="font-size:10px;" value="+200" onclick="pliusZZ(200);">
<input type=button style="font-size:10px;" value="+500" onclick="pliusZZ(500);">
</div>
<div class="full-info_auction-confirm">
<div class="auction-value">
Your Bid
<div class="ctrl_row">
<input placeholder="1000 €" class="robot i12" id=sumbid26588961>
<input type=checkbox onclick="fbid26588961.pbtn.disabled=!this.checked;" >
<input disabled name=pbtn onclick="placebid26588961();" type=button class="confirm-button" value="Confirm" />
</div>
<label class="confirm-raise">
<input placeholder="for bot" class="robot confirm-modify i12" />
<input class="checkbox-controller" type="checkbox" name="country" onclick="fbid26588961.rbtn.disabled=!this.checked;if(!this.checked){disablerobot26588961();}" />
<input onclick="enablerobot26588961();" name=rbtn type=button disabled value="Enable robot">
<div class="checkbox"></div><span><div style="color:red">Robot disabled</div></span>
</label>
</div>
</div>
</div>
<div class="clear"></div>
</form>
CSS
/* ORIGINAL CSS */
input[type="button"] {background: #5267ff; border-radius: 3px; border: none; font-family: 'Roboto', sans-serif; font-weight: 700; font-size: 11px; padding: 10px 14px; text-transform: uppercase;color:inherit;}
input[type="button"]:hover {background: #4758d2;}
.full-info_auction-operations {margin: 0 40px 0 85px; padding-top: 17px;}
.full-info_auction-operations input[type="button"] {display: inline-block; /*vertical-align: bottom;*/}
.full-info_auction-buy {max-width: 235px; display: inline-block; margin-right: 5px; padding: 5px 0 10px;}
.full-info_auction-operations.auction-value {font-family: 'Open Sans', sans-serif; font-size: 12px; color: #b1b1b1; display: inline-block; vertical-align: middle; text-align: left; line-height: 20px;margin: 0px 7px 0 0;}
.full-info_auction-operations.auction-value span {font-family: 'Roboto', sans-serif; font-weight: 700; font-size: 16px; color: #000; display: block;}
.full-info_auction-raise {max-width: 265px; display: inline-block; border-left: 1px solid #e7e7e8; border-right: 1px solid #e7e7e8; padding: 5px 10px 10px;}
//.full-info_auction-raise input[type="button"] {padding: 10px 11px 10px 10px; background: #000;}
.full-info_auction-confirm {max-width: 215px; display: inline-block; margin-left: 5px; padding: 5px 0 10px;}
.full-info_auction-confirm .auction-value {margin-right: 7px;}
.full-info_auction-operations > div {
vertical-align: top;
}
/* NEW CSS BELOW */
.auction-value { float: left; font-size: 80%; color: #888; margin-right: 5px; }
.auction-value span { display: block; color: #000; }
.full-info_auction-buy input[type='button'] { color: #fff; }
.full-info_auction-raise input[type='button'] { background: #000; color: #fff; }
.robot { width: 50px; }
.ctrl_row { margin-bottom: 5px; }
.ctrl_row input[type='button'],
.confirm-raise input[type='button'] { width: 120px; }
.confirm-modify { color: #fff; }
You only have to add vertical-align: top; than it should work.
There you go :
.full-info_auction-operations > div {
vertical-align: top;
}
This should do the job. #Mario Kurzweil answer was the good one, don't know why it's downvoted.
In my opinion this Fiddle comes to your desired layout very close. My added CSS is placed at the end (start is marked with a /* */ ).
CSS I've added
.auction-value {
display: inline-block;
vertical-align: top;
color: #CCC;
padding: 0 5px;
}
.auction-value > span {
display: block;
font-weight: bold;
color: #000;
}
.full-info_auction-confirm {
max-width: 420px;
}
.auction-value > input {
display: inline-block;
}
.bot-container {
margin-top: 5px;
}
.bot-container > label > * {
display: inline-block;
}
::-webkit-input-placeholder {
color: black;
font-weight: bold;
}
:-moz-placeholder {
/* Firefox 18- */
color: black;
font-weight: bold;
}
::-moz-placeholder {
/* Firefox 19+ */
color: black;
font-weight: bold;
}
:-ms-input-placeholder {
color: black;
font-weight: bold;
}
The new way of doing that is to use flexbox. Here's an example:
HTML:
<div class="wrapper">
<div></div>
<div></div>
<div></div>
</div>
CSS:
.wrapper {
display: flex;
}
That's all the styles you need.
BTW, you can use Autoprefixer to get the right browser prefixes.
Flexbox is supported by all the major browsers: http://caniuse.com/#search=flexbox