HTML+CSS: How do I put this 2 buttons at the same level verticallyAdding HTML entities using CSS contentConvert HTML + CSS to PDF with PHP?Where should I put <script> tags in HTML markup?How can I know which radio button is selected via jQuery?How do I give text or an image a transparent background using CSS?How to create an HTML button that acts like a link?How can I transition height: 0; to height: auto; using CSS?How do CSS triangles work?How to vertically align an image inside a div?How do I vertically center text with CSS?
Is it possible to set that path of the scp command to use by OpenSSH sshd daemon?
If Earth is tilted, why is Polaris always above the same spot?
Set command option with document wide newcommand
Why was the battle set up *outside* Winterfell?
Does this article imply that Turing-Computability is not the same as "effectively computable"?
How would adding a darkvision racial trait to Dragonborn affect balance?
Why does the `int` overload of `abs` get called in my code?
Would "lab meat" be able to feed a much larger global population
What is the most rudimentary input method a platform has ever been programmed in?
What does a yield inside a yield do?
Type-check an expression
Identifying a transmission to myself
Is it cheaper to drop cargo than to land it?
when are two topological spaces homeomorphic?
What happens to matryoshka Mordenkainen's Magnificent Mansions?
Father and Son and Grandsons
Python password manager
What algorithms are considered reinforcement learning algorithms?
Moving the subject of the sentence into a dangling participle
Do I really need diodes to receive MIDI?
How do I tell my manager that his code review comment is wrong?
How to improve/restore vintage Peugeot bike, or is it even worth it?
What are the differences between credential stuffing and password spraying?
Are triangulations of compact manifolds PL homeomorphic?
HTML+CSS: How do I put this 2 buttons at the same level vertically
Adding HTML entities using CSS contentConvert HTML + CSS to PDF with PHP?Where should I put <script> tags in HTML markup?How can I know which radio button is selected via jQuery?How do I give text or an image a transparent background using CSS?How to create an HTML button that acts like a link?How can I transition height: 0; to height: auto; using CSS?How do CSS triangles work?How to vertically align an image inside a div?How do I vertically center text with CSS?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
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
html css
add a comment |
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
html css
add a comment |
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
html css
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
html css
html css
edited Mar 22 at 21:13
Andy Hoffman
10.7k31940
10.7k31940
asked Mar 22 at 21:06
Jonathan FernandezJonathan Fernandez
82
82
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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">
<a href="registro.html" id="register">Register</a>
</div>
</form>
</section>jsFiddle
add a comment |
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">
<a href="registro.html" id="register" title="Registrar">Registrar</a>
</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;
I was doing it this way at the same time you responded, thanks! :) The problem is, can you still put this "Register" button right next to the other one instead under it?
– Jonathan Fernandez
Mar 22 at 21:33
I just did it making them display: flex and one on right and the other left. Thanks for the help!
– Jonathan Fernandez
Mar 22 at 21:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55307771%2fhtmlcss-how-do-i-put-this-2-buttons-at-the-same-level-vertically%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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">
<a href="registro.html" id="register">Register</a>
</div>
</form>
</section>jsFiddle
add a comment |
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">
<a href="registro.html" id="register">Register</a>
</div>
</form>
</section>jsFiddle
add a comment |
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">
<a href="registro.html" id="register">Register</a>
</div>
</form>
</section>jsFiddle
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">
<a href="registro.html" id="register">Register</a>
</div>
</form>
</section>jsFiddle
*
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">
<a href="registro.html" id="register">Register</a>
</div>
</form>
</section>*
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">
<a href="registro.html" id="register">Register</a>
</div>
</form>
</section>edited Mar 22 at 21:47
answered Mar 22 at 21:31
Andy HoffmanAndy Hoffman
10.7k31940
10.7k31940
add a comment |
add a comment |
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">
<a href="registro.html" id="register" title="Registrar">Registrar</a>
</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;
I was doing it this way at the same time you responded, thanks! :) The problem is, can you still put this "Register" button right next to the other one instead under it?
– Jonathan Fernandez
Mar 22 at 21:33
I just did it making them display: flex and one on right and the other left. Thanks for the help!
– Jonathan Fernandez
Mar 22 at 21:36
add a comment |
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">
<a href="registro.html" id="register" title="Registrar">Registrar</a>
</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;
I was doing it this way at the same time you responded, thanks! :) The problem is, can you still put this "Register" button right next to the other one instead under it?
– Jonathan Fernandez
Mar 22 at 21:33
I just did it making them display: flex and one on right and the other left. Thanks for the help!
– Jonathan Fernandez
Mar 22 at 21:36
add a comment |
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">
<a href="registro.html" id="register" title="Registrar">Registrar</a>
</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;
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">
<a href="registro.html" id="register" title="Registrar">Registrar</a>
</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;
answered Mar 22 at 21:26
Mark RabjohnMark Rabjohn
793514
793514
I was doing it this way at the same time you responded, thanks! :) The problem is, can you still put this "Register" button right next to the other one instead under it?
– Jonathan Fernandez
Mar 22 at 21:33
I just did it making them display: flex and one on right and the other left. Thanks for the help!
– Jonathan Fernandez
Mar 22 at 21:36
add a comment |
I was doing it this way at the same time you responded, thanks! :) The problem is, can you still put this "Register" button right next to the other one instead under it?
– Jonathan Fernandez
Mar 22 at 21:33
I just did it making them display: flex and one on right and the other left. Thanks for the help!
– Jonathan Fernandez
Mar 22 at 21:36
I was doing it this way at the same time you responded, thanks! :) The problem is, can you still put this "Register" button right next to the other one instead under it?
– Jonathan Fernandez
Mar 22 at 21:33
I was doing it this way at the same time you responded, thanks! :) The problem is, can you still put this "Register" button right next to the other one instead under it?
– Jonathan Fernandez
Mar 22 at 21:33
I just did it making them display: flex and one on right and the other left. Thanks for the help!
– Jonathan Fernandez
Mar 22 at 21:36
I just did it making them display: flex and one on right and the other left. Thanks for the help!
– Jonathan Fernandez
Mar 22 at 21:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55307771%2fhtmlcss-how-do-i-put-this-2-buttons-at-the-same-level-vertically%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown