Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input with button on same line, no widths #174

Open
mhulse opened this issue Apr 1, 2018 · 0 comments
Open

Input with button on same line, no widths #174

mhulse opened this issue Apr 1, 2018 · 0 comments

Comments

@mhulse
Copy link
Owner

mhulse commented Apr 1, 2018

This example assumes you have styles for the look/feel elsewhere in your code:

/*
<div class="advo-input-group">
    <div>
        <input type="password" placeholder="Password">
    </div>
    <div>
        <button class="advo-button">Go</button>
    </div>
</div>
*/

.advo-input-group {
    width: 100%;
    display: table;
}
.advo-input-group > div {
    display: table-cell;
    width: 100%;
    background-clip: padding-box;
}
.advo-input-group > div + div {
    border-left: 1rem solid transparent;
}
.advo-input-group input,
.advo-input-group button {
    margin: 0;
}
.advo-input-group input {
    width: 100%;
}
.advo-input-group button {
    margin: 0;
    width: auto;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant