How to add Font Awesome icon on the left of input group in Bootstrap-vue or Bootstrap 4?
up vote
0
down vote
favorite
I've tried to search for the way to insert the Font Awesome icon
to the input group for Bootstrap-vue
but nothing appears. I tried to search for Bootstrap 4 but most tutorials are for Bootstrap 3. I've tried this but it doesn't work for me.
What I have now:
It should look like this (The icon only, not the whole style):
My HTML:
<b-card no-body class="UniqueFullWidth">
<b-tabs card>
<b-tab title="Sign up" style="width:auto">
<br>
<b-form-input size="lg" placeholder="Full name">
</b-form-input>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
<br>
<b-form-input size="lg" type="email" placeholder="Email">
</b-form-input>
</b-tab>
<b-tab title="Log in" active>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
</b-tab>
</b-tabs>
</b-card>
My current CSS:
.UniqueFullWidth .card-header {
font-size: 1.3em;
}
.UniqueFullWidth {
width: 400px;
margin: auto;
}
.UniqueFullWidth .card-header-tabs {
margin-right: -21px;
margin-left: -21px;
margin-top: -13px;
}
.UniqueFullWidth .nav-tabs .nav-link.active {
color: #000;
}
.UniqueFullWidth .nav-link {
color: #979faf;
}
.UniqueFullWidth .nav-link:hover {
color: #62676d;
}
.UniqueFullWidth .nav-tabs .nav-item {
margin-bottom: -1px;
flex-grow: 1;
text-align: center;
}
html css bootstrap-4 bootstrap-vue
add a comment |
up vote
0
down vote
favorite
I've tried to search for the way to insert the Font Awesome icon
to the input group for Bootstrap-vue
but nothing appears. I tried to search for Bootstrap 4 but most tutorials are for Bootstrap 3. I've tried this but it doesn't work for me.
What I have now:
It should look like this (The icon only, not the whole style):
My HTML:
<b-card no-body class="UniqueFullWidth">
<b-tabs card>
<b-tab title="Sign up" style="width:auto">
<br>
<b-form-input size="lg" placeholder="Full name">
</b-form-input>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
<br>
<b-form-input size="lg" type="email" placeholder="Email">
</b-form-input>
</b-tab>
<b-tab title="Log in" active>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
</b-tab>
</b-tabs>
</b-card>
My current CSS:
.UniqueFullWidth .card-header {
font-size: 1.3em;
}
.UniqueFullWidth {
width: 400px;
margin: auto;
}
.UniqueFullWidth .card-header-tabs {
margin-right: -21px;
margin-left: -21px;
margin-top: -13px;
}
.UniqueFullWidth .nav-tabs .nav-link.active {
color: #000;
}
.UniqueFullWidth .nav-link {
color: #979faf;
}
.UniqueFullWidth .nav-link:hover {
color: #62676d;
}
.UniqueFullWidth .nav-tabs .nav-item {
margin-bottom: -1px;
flex-grow: 1;
text-align: center;
}
html css bootstrap-4 bootstrap-vue
Isn't it your navigation css, but you are asking for form. :(
– codesayan
Nov 10 at 6:20
So I am using Bootstrap-vue for the page and it has no expand tabs so I need to use the element, that's why you could the the navigation css.
– quanpham0805
Nov 10 at 15:41
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've tried to search for the way to insert the Font Awesome icon
to the input group for Bootstrap-vue
but nothing appears. I tried to search for Bootstrap 4 but most tutorials are for Bootstrap 3. I've tried this but it doesn't work for me.
What I have now:
It should look like this (The icon only, not the whole style):
My HTML:
<b-card no-body class="UniqueFullWidth">
<b-tabs card>
<b-tab title="Sign up" style="width:auto">
<br>
<b-form-input size="lg" placeholder="Full name">
</b-form-input>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
<br>
<b-form-input size="lg" type="email" placeholder="Email">
</b-form-input>
</b-tab>
<b-tab title="Log in" active>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
</b-tab>
</b-tabs>
</b-card>
My current CSS:
.UniqueFullWidth .card-header {
font-size: 1.3em;
}
.UniqueFullWidth {
width: 400px;
margin: auto;
}
.UniqueFullWidth .card-header-tabs {
margin-right: -21px;
margin-left: -21px;
margin-top: -13px;
}
.UniqueFullWidth .nav-tabs .nav-link.active {
color: #000;
}
.UniqueFullWidth .nav-link {
color: #979faf;
}
.UniqueFullWidth .nav-link:hover {
color: #62676d;
}
.UniqueFullWidth .nav-tabs .nav-item {
margin-bottom: -1px;
flex-grow: 1;
text-align: center;
}
html css bootstrap-4 bootstrap-vue
I've tried to search for the way to insert the Font Awesome icon
to the input group for Bootstrap-vue
but nothing appears. I tried to search for Bootstrap 4 but most tutorials are for Bootstrap 3. I've tried this but it doesn't work for me.
What I have now:
It should look like this (The icon only, not the whole style):
My HTML:
<b-card no-body class="UniqueFullWidth">
<b-tabs card>
<b-tab title="Sign up" style="width:auto">
<br>
<b-form-input size="lg" placeholder="Full name">
</b-form-input>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
<br>
<b-form-input size="lg" type="email" placeholder="Email">
</b-form-input>
</b-tab>
<b-tab title="Log in" active>
<br>
<b-form-input size="lg" placeholder="Username">
</b-form-input>
<br>
<b-form-input size="lg" type="password" placeholder="Password">
</b-form-input>
</b-tab>
</b-tabs>
</b-card>
My current CSS:
.UniqueFullWidth .card-header {
font-size: 1.3em;
}
.UniqueFullWidth {
width: 400px;
margin: auto;
}
.UniqueFullWidth .card-header-tabs {
margin-right: -21px;
margin-left: -21px;
margin-top: -13px;
}
.UniqueFullWidth .nav-tabs .nav-link.active {
color: #000;
}
.UniqueFullWidth .nav-link {
color: #979faf;
}
.UniqueFullWidth .nav-link:hover {
color: #62676d;
}
.UniqueFullWidth .nav-tabs .nav-item {
margin-bottom: -1px;
flex-grow: 1;
text-align: center;
}
html css bootstrap-4 bootstrap-vue
html css bootstrap-4 bootstrap-vue
asked Nov 10 at 4:13
quanpham0805
349
349
Isn't it your navigation css, but you are asking for form. :(
– codesayan
Nov 10 at 6:20
So I am using Bootstrap-vue for the page and it has no expand tabs so I need to use the element, that's why you could the the navigation css.
– quanpham0805
Nov 10 at 15:41
add a comment |
Isn't it your navigation css, but you are asking for form. :(
– codesayan
Nov 10 at 6:20
So I am using Bootstrap-vue for the page and it has no expand tabs so I need to use the element, that's why you could the the navigation css.
– quanpham0805
Nov 10 at 15:41
Isn't it your navigation css, but you are asking for form. :(
– codesayan
Nov 10 at 6:20
Isn't it your navigation css, but you are asking for form. :(
– codesayan
Nov 10 at 6:20
So I am using Bootstrap-vue for the page and it has no expand tabs so I need to use the element, that's why you could the the navigation css.
– quanpham0805
Nov 10 at 15:41
So I am using Bootstrap-vue for the page and it has no expand tabs so I need to use the element, that's why you could the the navigation css.
– quanpham0805
Nov 10 at 15:41
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Use <b-input-group>
and <b-input-group-prepend>
HTML:
<b-input-group>
<b-input-group-prepend>
<span class="input-group-text"><i class="fa fa-user fa-lg"></i></span>
</b-input-group-prepend>
<b-form-input class="LoginInput" size="lg" placeholder="Username">
</b-form-input>
</b-input-group>
CSS:
.UniqueFullWidth .input-group-text {
width: 48px;
border-right: none;
background-color: #ffffff;
}
.UniqueFullWidth [class^="fa-"], [class*=" fa-"] {
display: inline-block;
width: 100%;
}
.UniqueFullWidth .LoginInput {
border-left: none;
}
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',
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%2f53235933%2fhow-to-add-font-awesome-icon-on-the-left-of-input-group-in-bootstrap-vue-or-boot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Use <b-input-group>
and <b-input-group-prepend>
HTML:
<b-input-group>
<b-input-group-prepend>
<span class="input-group-text"><i class="fa fa-user fa-lg"></i></span>
</b-input-group-prepend>
<b-form-input class="LoginInput" size="lg" placeholder="Username">
</b-form-input>
</b-input-group>
CSS:
.UniqueFullWidth .input-group-text {
width: 48px;
border-right: none;
background-color: #ffffff;
}
.UniqueFullWidth [class^="fa-"], [class*=" fa-"] {
display: inline-block;
width: 100%;
}
.UniqueFullWidth .LoginInput {
border-left: none;
}
add a comment |
up vote
0
down vote
accepted
Use <b-input-group>
and <b-input-group-prepend>
HTML:
<b-input-group>
<b-input-group-prepend>
<span class="input-group-text"><i class="fa fa-user fa-lg"></i></span>
</b-input-group-prepend>
<b-form-input class="LoginInput" size="lg" placeholder="Username">
</b-form-input>
</b-input-group>
CSS:
.UniqueFullWidth .input-group-text {
width: 48px;
border-right: none;
background-color: #ffffff;
}
.UniqueFullWidth [class^="fa-"], [class*=" fa-"] {
display: inline-block;
width: 100%;
}
.UniqueFullWidth .LoginInput {
border-left: none;
}
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Use <b-input-group>
and <b-input-group-prepend>
HTML:
<b-input-group>
<b-input-group-prepend>
<span class="input-group-text"><i class="fa fa-user fa-lg"></i></span>
</b-input-group-prepend>
<b-form-input class="LoginInput" size="lg" placeholder="Username">
</b-form-input>
</b-input-group>
CSS:
.UniqueFullWidth .input-group-text {
width: 48px;
border-right: none;
background-color: #ffffff;
}
.UniqueFullWidth [class^="fa-"], [class*=" fa-"] {
display: inline-block;
width: 100%;
}
.UniqueFullWidth .LoginInput {
border-left: none;
}
Use <b-input-group>
and <b-input-group-prepend>
HTML:
<b-input-group>
<b-input-group-prepend>
<span class="input-group-text"><i class="fa fa-user fa-lg"></i></span>
</b-input-group-prepend>
<b-form-input class="LoginInput" size="lg" placeholder="Username">
</b-form-input>
</b-input-group>
CSS:
.UniqueFullWidth .input-group-text {
width: 48px;
border-right: none;
background-color: #ffffff;
}
.UniqueFullWidth [class^="fa-"], [class*=" fa-"] {
display: inline-block;
width: 100%;
}
.UniqueFullWidth .LoginInput {
border-left: none;
}
answered Nov 10 at 21:01
quanpham0805
349
349
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f53235933%2fhow-to-add-font-awesome-icon-on-the-left-of-input-group-in-bootstrap-vue-or-boot%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
Isn't it your navigation css, but you are asking for form. :(
– codesayan
Nov 10 at 6:20
So I am using Bootstrap-vue for the page and it has no expand tabs so I need to use the element, that's why you could the the navigation css.
– quanpham0805
Nov 10 at 15:41