Remove border from input box bootstrap
I am creating a website using bootstrap, less and angular and I've been struggling all day with the input field for search bar. I tried using the bootstrap input-group with both input-group-addon and input-group-button but I cannot seem to be able to remove the border between the button and the input. Actually I cannot change the border at all. Any suggestions on how I could do this. I would like my search box have the same behaviour as in duckduckgo.
UPDATE:
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
So this is my code. I don't know how to make a JSFiddle with it so that the bootstrap styling is preserved. I have also tried putting the html and css from this link http://jsfiddle.net/CbGpP/2/ into my code and the line between the button and input is still preserved, neither it turns green on click.
html css angularjs twitter-bootstrap less
add a comment |
I am creating a website using bootstrap, less and angular and I've been struggling all day with the input field for search bar. I tried using the bootstrap input-group with both input-group-addon and input-group-button but I cannot seem to be able to remove the border between the button and the input. Actually I cannot change the border at all. Any suggestions on how I could do this. I would like my search box have the same behaviour as in duckduckgo.
UPDATE:
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
So this is my code. I don't know how to make a JSFiddle with it so that the bootstrap styling is preserved. I have also tried putting the html and css from this link http://jsfiddle.net/CbGpP/2/ into my code and the line between the button and input is still preserved, neither it turns green on click.
html css angularjs twitter-bootstrap less
Share your code via jsfiddle.net, so we can see your code online.
– ocanal
Feb 4 '15 at 19:32
add a comment |
I am creating a website using bootstrap, less and angular and I've been struggling all day with the input field for search bar. I tried using the bootstrap input-group with both input-group-addon and input-group-button but I cannot seem to be able to remove the border between the button and the input. Actually I cannot change the border at all. Any suggestions on how I could do this. I would like my search box have the same behaviour as in duckduckgo.
UPDATE:
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
So this is my code. I don't know how to make a JSFiddle with it so that the bootstrap styling is preserved. I have also tried putting the html and css from this link http://jsfiddle.net/CbGpP/2/ into my code and the line between the button and input is still preserved, neither it turns green on click.
html css angularjs twitter-bootstrap less
I am creating a website using bootstrap, less and angular and I've been struggling all day with the input field for search bar. I tried using the bootstrap input-group with both input-group-addon and input-group-button but I cannot seem to be able to remove the border between the button and the input. Actually I cannot change the border at all. Any suggestions on how I could do this. I would like my search box have the same behaviour as in duckduckgo.
UPDATE:
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
So this is my code. I don't know how to make a JSFiddle with it so that the bootstrap styling is preserved. I have also tried putting the html and css from this link http://jsfiddle.net/CbGpP/2/ into my code and the line between the button and input is still preserved, neither it turns green on click.
html css angularjs twitter-bootstrap less
html css angularjs twitter-bootstrap less
edited Feb 4 '15 at 19:52
Ela
asked Feb 4 '15 at 19:30
ElaEla
1,30131627
1,30131627
Share your code via jsfiddle.net, so we can see your code online.
– ocanal
Feb 4 '15 at 19:32
add a comment |
Share your code via jsfiddle.net, so we can see your code online.
– ocanal
Feb 4 '15 at 19:32
Share your code via jsfiddle.net, so we can see your code online.
– ocanal
Feb 4 '15 at 19:32
Share your code via jsfiddle.net, so we can see your code online.
– ocanal
Feb 4 '15 at 19:32
add a comment |
5 Answers
5
active
oldest
votes
If I got you right then making outline: 0
should solve your problem.
If I got it wrong, please post some pictures so that we can see your actual problem and also post the codes of what you've tried till now.
EDIT:
Here is the Fiddle:
Basically, you need to remove the right border of the text field, left border of the icon and background color of the icon.
Added a class search-input
to the text field and search-icon
to the icon.
Here is the CSS:
.search-input {
border-right: 0;
}
.search-icon {
border-left:0 solid transparent;
background:transparent;
}
changing to outline: 0 on the element within the browser (Chrome) did not change anything.
– Ela
Feb 4 '15 at 19:54
Image here is how the jsfiddle and my code looks on my page
– Ela
Feb 4 '15 at 20:11
Edited my answer. Check it now. Hope it helps. :)
– Anupam Basak
Feb 5 '15 at 21:01
add a comment |
Setting border:none;
should do it.
It doesn't matter whether I put border:none; or outline:0; they all seem to be overriden. Also I don't understand why putting the code from JsFiddle wouldn't work, again the attributes seem to be overridden by something.
– Ela
Feb 4 '15 at 20:49
Here's an updated, working, version of your jsFiddle (jsfiddle.net/CbGpP/58).. It's not 100% there but its along the right path
– shaneparsons
Feb 4 '15 at 21:21
Sorry, won't let me edit my previous comment, here's the right link: (jsfiddle.net/CbGpP/61)
– shaneparsons
Feb 4 '15 at 21:29
add a comment |
Being very silly, in the index.html I have added bootstrap stylesheet then my custom one and again bootstrap. Deleting last line solved all my problems.
add a comment |
This question answered in this link Bootstrap: Remove form field border
Basically what you have to do just add the following css to the form-control class
.form-control {
border: 0;
}
After this, you will get the input box without border.
OR Also you can do like that
.no-border {
border: 0;
box-shadow: none; /* You may want to include this as bootstrap applies these styles too */
}
+1 on box shadow. I've overlooked this for a moment. After a deep zoom the gradient of the shadow was visible. Without the zoom the shadow seemed like a normal gray border.
– Nrzonline
Sep 11 '17 at 9:40
add a comment |
In Bootstrap 4 you can easily use it as below.
<span class="border-0"></span>
In Your case
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control border-0" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
Official Documentation
https://getbootstrap.com/docs/4.1/utilities/borders/
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%2f28329803%2fremove-border-from-input-box-bootstrap%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I got you right then making outline: 0
should solve your problem.
If I got it wrong, please post some pictures so that we can see your actual problem and also post the codes of what you've tried till now.
EDIT:
Here is the Fiddle:
Basically, you need to remove the right border of the text field, left border of the icon and background color of the icon.
Added a class search-input
to the text field and search-icon
to the icon.
Here is the CSS:
.search-input {
border-right: 0;
}
.search-icon {
border-left:0 solid transparent;
background:transparent;
}
changing to outline: 0 on the element within the browser (Chrome) did not change anything.
– Ela
Feb 4 '15 at 19:54
Image here is how the jsfiddle and my code looks on my page
– Ela
Feb 4 '15 at 20:11
Edited my answer. Check it now. Hope it helps. :)
– Anupam Basak
Feb 5 '15 at 21:01
add a comment |
If I got you right then making outline: 0
should solve your problem.
If I got it wrong, please post some pictures so that we can see your actual problem and also post the codes of what you've tried till now.
EDIT:
Here is the Fiddle:
Basically, you need to remove the right border of the text field, left border of the icon and background color of the icon.
Added a class search-input
to the text field and search-icon
to the icon.
Here is the CSS:
.search-input {
border-right: 0;
}
.search-icon {
border-left:0 solid transparent;
background:transparent;
}
changing to outline: 0 on the element within the browser (Chrome) did not change anything.
– Ela
Feb 4 '15 at 19:54
Image here is how the jsfiddle and my code looks on my page
– Ela
Feb 4 '15 at 20:11
Edited my answer. Check it now. Hope it helps. :)
– Anupam Basak
Feb 5 '15 at 21:01
add a comment |
If I got you right then making outline: 0
should solve your problem.
If I got it wrong, please post some pictures so that we can see your actual problem and also post the codes of what you've tried till now.
EDIT:
Here is the Fiddle:
Basically, you need to remove the right border of the text field, left border of the icon and background color of the icon.
Added a class search-input
to the text field and search-icon
to the icon.
Here is the CSS:
.search-input {
border-right: 0;
}
.search-icon {
border-left:0 solid transparent;
background:transparent;
}
If I got you right then making outline: 0
should solve your problem.
If I got it wrong, please post some pictures so that we can see your actual problem and also post the codes of what you've tried till now.
EDIT:
Here is the Fiddle:
Basically, you need to remove the right border of the text field, left border of the icon and background color of the icon.
Added a class search-input
to the text field and search-icon
to the icon.
Here is the CSS:
.search-input {
border-right: 0;
}
.search-icon {
border-left:0 solid transparent;
background:transparent;
}
edited May 23 '18 at 7:48
Prashant Pokhriyal
2,27441724
2,27441724
answered Feb 4 '15 at 19:33
Anupam BasakAnupam Basak
1,355713
1,355713
changing to outline: 0 on the element within the browser (Chrome) did not change anything.
– Ela
Feb 4 '15 at 19:54
Image here is how the jsfiddle and my code looks on my page
– Ela
Feb 4 '15 at 20:11
Edited my answer. Check it now. Hope it helps. :)
– Anupam Basak
Feb 5 '15 at 21:01
add a comment |
changing to outline: 0 on the element within the browser (Chrome) did not change anything.
– Ela
Feb 4 '15 at 19:54
Image here is how the jsfiddle and my code looks on my page
– Ela
Feb 4 '15 at 20:11
Edited my answer. Check it now. Hope it helps. :)
– Anupam Basak
Feb 5 '15 at 21:01
changing to outline: 0 on the element within the browser (Chrome) did not change anything.
– Ela
Feb 4 '15 at 19:54
changing to outline: 0 on the element within the browser (Chrome) did not change anything.
– Ela
Feb 4 '15 at 19:54
Image here is how the jsfiddle and my code looks on my page
– Ela
Feb 4 '15 at 20:11
Image here is how the jsfiddle and my code looks on my page
– Ela
Feb 4 '15 at 20:11
Edited my answer. Check it now. Hope it helps. :)
– Anupam Basak
Feb 5 '15 at 21:01
Edited my answer. Check it now. Hope it helps. :)
– Anupam Basak
Feb 5 '15 at 21:01
add a comment |
Setting border:none;
should do it.
It doesn't matter whether I put border:none; or outline:0; they all seem to be overriden. Also I don't understand why putting the code from JsFiddle wouldn't work, again the attributes seem to be overridden by something.
– Ela
Feb 4 '15 at 20:49
Here's an updated, working, version of your jsFiddle (jsfiddle.net/CbGpP/58).. It's not 100% there but its along the right path
– shaneparsons
Feb 4 '15 at 21:21
Sorry, won't let me edit my previous comment, here's the right link: (jsfiddle.net/CbGpP/61)
– shaneparsons
Feb 4 '15 at 21:29
add a comment |
Setting border:none;
should do it.
It doesn't matter whether I put border:none; or outline:0; they all seem to be overriden. Also I don't understand why putting the code from JsFiddle wouldn't work, again the attributes seem to be overridden by something.
– Ela
Feb 4 '15 at 20:49
Here's an updated, working, version of your jsFiddle (jsfiddle.net/CbGpP/58).. It's not 100% there but its along the right path
– shaneparsons
Feb 4 '15 at 21:21
Sorry, won't let me edit my previous comment, here's the right link: (jsfiddle.net/CbGpP/61)
– shaneparsons
Feb 4 '15 at 21:29
add a comment |
Setting border:none;
should do it.
Setting border:none;
should do it.
answered Feb 4 '15 at 20:35
shaneparsonsshaneparsons
78111015
78111015
It doesn't matter whether I put border:none; or outline:0; they all seem to be overriden. Also I don't understand why putting the code from JsFiddle wouldn't work, again the attributes seem to be overridden by something.
– Ela
Feb 4 '15 at 20:49
Here's an updated, working, version of your jsFiddle (jsfiddle.net/CbGpP/58).. It's not 100% there but its along the right path
– shaneparsons
Feb 4 '15 at 21:21
Sorry, won't let me edit my previous comment, here's the right link: (jsfiddle.net/CbGpP/61)
– shaneparsons
Feb 4 '15 at 21:29
add a comment |
It doesn't matter whether I put border:none; or outline:0; they all seem to be overriden. Also I don't understand why putting the code from JsFiddle wouldn't work, again the attributes seem to be overridden by something.
– Ela
Feb 4 '15 at 20:49
Here's an updated, working, version of your jsFiddle (jsfiddle.net/CbGpP/58).. It's not 100% there but its along the right path
– shaneparsons
Feb 4 '15 at 21:21
Sorry, won't let me edit my previous comment, here's the right link: (jsfiddle.net/CbGpP/61)
– shaneparsons
Feb 4 '15 at 21:29
It doesn't matter whether I put border:none; or outline:0; they all seem to be overriden. Also I don't understand why putting the code from JsFiddle wouldn't work, again the attributes seem to be overridden by something.
– Ela
Feb 4 '15 at 20:49
It doesn't matter whether I put border:none; or outline:0; they all seem to be overriden. Also I don't understand why putting the code from JsFiddle wouldn't work, again the attributes seem to be overridden by something.
– Ela
Feb 4 '15 at 20:49
Here's an updated, working, version of your jsFiddle (jsfiddle.net/CbGpP/58).. It's not 100% there but its along the right path
– shaneparsons
Feb 4 '15 at 21:21
Here's an updated, working, version of your jsFiddle (jsfiddle.net/CbGpP/58).. It's not 100% there but its along the right path
– shaneparsons
Feb 4 '15 at 21:21
Sorry, won't let me edit my previous comment, here's the right link: (jsfiddle.net/CbGpP/61)
– shaneparsons
Feb 4 '15 at 21:29
Sorry, won't let me edit my previous comment, here's the right link: (jsfiddle.net/CbGpP/61)
– shaneparsons
Feb 4 '15 at 21:29
add a comment |
Being very silly, in the index.html I have added bootstrap stylesheet then my custom one and again bootstrap. Deleting last line solved all my problems.
add a comment |
Being very silly, in the index.html I have added bootstrap stylesheet then my custom one and again bootstrap. Deleting last line solved all my problems.
add a comment |
Being very silly, in the index.html I have added bootstrap stylesheet then my custom one and again bootstrap. Deleting last line solved all my problems.
Being very silly, in the index.html I have added bootstrap stylesheet then my custom one and again bootstrap. Deleting last line solved all my problems.
answered Feb 13 '15 at 16:47
ElaEla
1,30131627
1,30131627
add a comment |
add a comment |
This question answered in this link Bootstrap: Remove form field border
Basically what you have to do just add the following css to the form-control class
.form-control {
border: 0;
}
After this, you will get the input box without border.
OR Also you can do like that
.no-border {
border: 0;
box-shadow: none; /* You may want to include this as bootstrap applies these styles too */
}
+1 on box shadow. I've overlooked this for a moment. After a deep zoom the gradient of the shadow was visible. Without the zoom the shadow seemed like a normal gray border.
– Nrzonline
Sep 11 '17 at 9:40
add a comment |
This question answered in this link Bootstrap: Remove form field border
Basically what you have to do just add the following css to the form-control class
.form-control {
border: 0;
}
After this, you will get the input box without border.
OR Also you can do like that
.no-border {
border: 0;
box-shadow: none; /* You may want to include this as bootstrap applies these styles too */
}
+1 on box shadow. I've overlooked this for a moment. After a deep zoom the gradient of the shadow was visible. Without the zoom the shadow seemed like a normal gray border.
– Nrzonline
Sep 11 '17 at 9:40
add a comment |
This question answered in this link Bootstrap: Remove form field border
Basically what you have to do just add the following css to the form-control class
.form-control {
border: 0;
}
After this, you will get the input box without border.
OR Also you can do like that
.no-border {
border: 0;
box-shadow: none; /* You may want to include this as bootstrap applies these styles too */
}
This question answered in this link Bootstrap: Remove form field border
Basically what you have to do just add the following css to the form-control class
.form-control {
border: 0;
}
After this, you will get the input box without border.
OR Also you can do like that
.no-border {
border: 0;
box-shadow: none; /* You may want to include this as bootstrap applies these styles too */
}
edited May 23 '17 at 11:53
Community♦
11
11
answered Feb 10 '17 at 11:20
VIKAS KOHLIVIKAS KOHLI
2,84611625
2,84611625
+1 on box shadow. I've overlooked this for a moment. After a deep zoom the gradient of the shadow was visible. Without the zoom the shadow seemed like a normal gray border.
– Nrzonline
Sep 11 '17 at 9:40
add a comment |
+1 on box shadow. I've overlooked this for a moment. After a deep zoom the gradient of the shadow was visible. Without the zoom the shadow seemed like a normal gray border.
– Nrzonline
Sep 11 '17 at 9:40
+1 on box shadow. I've overlooked this for a moment. After a deep zoom the gradient of the shadow was visible. Without the zoom the shadow seemed like a normal gray border.
– Nrzonline
Sep 11 '17 at 9:40
+1 on box shadow. I've overlooked this for a moment. After a deep zoom the gradient of the shadow was visible. Without the zoom the shadow seemed like a normal gray border.
– Nrzonline
Sep 11 '17 at 9:40
add a comment |
In Bootstrap 4 you can easily use it as below.
<span class="border-0"></span>
In Your case
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control border-0" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
Official Documentation
https://getbootstrap.com/docs/4.1/utilities/borders/
add a comment |
In Bootstrap 4 you can easily use it as below.
<span class="border-0"></span>
In Your case
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control border-0" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
Official Documentation
https://getbootstrap.com/docs/4.1/utilities/borders/
add a comment |
In Bootstrap 4 you can easily use it as below.
<span class="border-0"></span>
In Your case
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control border-0" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
Official Documentation
https://getbootstrap.com/docs/4.1/utilities/borders/
In Bootstrap 4 you can easily use it as below.
<span class="border-0"></span>
In Your case
<form role="form" action="results.html" style="padding:30px">
<p class="input-group">
<input type="text" class="form-control border-0" name="q" /> <span class="input-group-addon" style="border-left-width: 0px"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></span>
<input type="hidden" name="mode" value="web" />
</p>
Official Documentation
https://getbootstrap.com/docs/4.1/utilities/borders/
answered Nov 25 '18 at 20:50
cem kiliclicem kilicli
11
11
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.
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%2f28329803%2fremove-border-from-input-box-bootstrap%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
Share your code via jsfiddle.net, so we can see your code online.
– ocanal
Feb 4 '15 at 19:32