Nav-toggler button position on mobile and tablet resolution
I have been struggling with this one for days now, any help to sort this out would be greatly appreciated. I need the hamburger icon on the right side, contact picture with phone number on it in the middle ad brand logo on the left. For some reason toggler is getting pushed outside its col-3 grid. I am using bootstrap 4.
<header>
<div class="container-fluid">
<div class="row">
<div class="col-5 col-sm-4 col-md-5 col-lg-4 col-xl-4">
<img class="logo img-fluid" src="/img/logo.png" alt="logo">
</div>
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-3">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4">
<nav class="navbar navbar-expand-lg bg-none">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle Navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link home" href="#">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link security-services" href="#">SECURITY SERVICES</a>
</li>
<li class="nav-item">
<a class="nav-link contact-us" href="#">CONTACT US</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
</header>
/////////collapsed nav//////////
@media (min-width: 601px) and (max-width: 991px) {
.fa-bars {
transform: scale(2.2, 1.3);
-webkit-transform: scale(2.2, 1.3); /* Safari and Chrome */
-moz-transform: scale(2.2, 1.3); /* Firefox */
-ms-transform: scale(2.2, 1.3); /* IE 9+ */
-o-transform: scale(2.2, 1.3); /* Opera */
color: white;
margin: 15px -30px 10px 20px;
}
.navbar-nav {
background-color: white;
margin: 5px 50px 30px 0px;
}
.navbar-nav a {
color: #6d3093;
}
}
@media (max-width: 600px) {
.fa-bars {
transform: scale(2.0, 1.2);
-webkit-transform: scale(2.0, 1.2); /* Safari and Chrome */
-moz-transform: scale(2.0, 1.2); /* Firefox */
-ms-transform: scale(2.0, 1.2); /* IE 9+ */
-o-transform: scale(2.0, 1.2); /* Opera */
margin: 15px -30px 10px 20px;
}
.navbar-toggler {
color: white;
margin-right: 90px;
}
.navbar-nav {
background-color: white;
margin-top: 18px;
}
.navbar-nav a {
color: #6d3093;
}
html css3 bootstrap-4 navbar hamburger-menu
add a comment |
I have been struggling with this one for days now, any help to sort this out would be greatly appreciated. I need the hamburger icon on the right side, contact picture with phone number on it in the middle ad brand logo on the left. For some reason toggler is getting pushed outside its col-3 grid. I am using bootstrap 4.
<header>
<div class="container-fluid">
<div class="row">
<div class="col-5 col-sm-4 col-md-5 col-lg-4 col-xl-4">
<img class="logo img-fluid" src="/img/logo.png" alt="logo">
</div>
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-3">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4">
<nav class="navbar navbar-expand-lg bg-none">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle Navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link home" href="#">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link security-services" href="#">SECURITY SERVICES</a>
</li>
<li class="nav-item">
<a class="nav-link contact-us" href="#">CONTACT US</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
</header>
/////////collapsed nav//////////
@media (min-width: 601px) and (max-width: 991px) {
.fa-bars {
transform: scale(2.2, 1.3);
-webkit-transform: scale(2.2, 1.3); /* Safari and Chrome */
-moz-transform: scale(2.2, 1.3); /* Firefox */
-ms-transform: scale(2.2, 1.3); /* IE 9+ */
-o-transform: scale(2.2, 1.3); /* Opera */
color: white;
margin: 15px -30px 10px 20px;
}
.navbar-nav {
background-color: white;
margin: 5px 50px 30px 0px;
}
.navbar-nav a {
color: #6d3093;
}
}
@media (max-width: 600px) {
.fa-bars {
transform: scale(2.0, 1.2);
-webkit-transform: scale(2.0, 1.2); /* Safari and Chrome */
-moz-transform: scale(2.0, 1.2); /* Firefox */
-ms-transform: scale(2.0, 1.2); /* IE 9+ */
-o-transform: scale(2.0, 1.2); /* Opera */
margin: 15px -30px 10px 20px;
}
.navbar-toggler {
color: white;
margin-right: 90px;
}
.navbar-nav {
background-color: white;
margin-top: 18px;
}
.navbar-nav a {
color: #6d3093;
}
html css3 bootstrap-4 navbar hamburger-menu
Can you show me the screenshot of your problem?
– Muhammad Tahseen ur Rehman
Nov 22 '18 at 13:09
It would be better if you recreate the problem in codepen or jsfiddle, also can you explain it a bit better?
– Nikola Kostov
Nov 26 '18 at 14:44
add a comment |
I have been struggling with this one for days now, any help to sort this out would be greatly appreciated. I need the hamburger icon on the right side, contact picture with phone number on it in the middle ad brand logo on the left. For some reason toggler is getting pushed outside its col-3 grid. I am using bootstrap 4.
<header>
<div class="container-fluid">
<div class="row">
<div class="col-5 col-sm-4 col-md-5 col-lg-4 col-xl-4">
<img class="logo img-fluid" src="/img/logo.png" alt="logo">
</div>
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-3">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4">
<nav class="navbar navbar-expand-lg bg-none">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle Navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link home" href="#">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link security-services" href="#">SECURITY SERVICES</a>
</li>
<li class="nav-item">
<a class="nav-link contact-us" href="#">CONTACT US</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
</header>
/////////collapsed nav//////////
@media (min-width: 601px) and (max-width: 991px) {
.fa-bars {
transform: scale(2.2, 1.3);
-webkit-transform: scale(2.2, 1.3); /* Safari and Chrome */
-moz-transform: scale(2.2, 1.3); /* Firefox */
-ms-transform: scale(2.2, 1.3); /* IE 9+ */
-o-transform: scale(2.2, 1.3); /* Opera */
color: white;
margin: 15px -30px 10px 20px;
}
.navbar-nav {
background-color: white;
margin: 5px 50px 30px 0px;
}
.navbar-nav a {
color: #6d3093;
}
}
@media (max-width: 600px) {
.fa-bars {
transform: scale(2.0, 1.2);
-webkit-transform: scale(2.0, 1.2); /* Safari and Chrome */
-moz-transform: scale(2.0, 1.2); /* Firefox */
-ms-transform: scale(2.0, 1.2); /* IE 9+ */
-o-transform: scale(2.0, 1.2); /* Opera */
margin: 15px -30px 10px 20px;
}
.navbar-toggler {
color: white;
margin-right: 90px;
}
.navbar-nav {
background-color: white;
margin-top: 18px;
}
.navbar-nav a {
color: #6d3093;
}
html css3 bootstrap-4 navbar hamburger-menu
I have been struggling with this one for days now, any help to sort this out would be greatly appreciated. I need the hamburger icon on the right side, contact picture with phone number on it in the middle ad brand logo on the left. For some reason toggler is getting pushed outside its col-3 grid. I am using bootstrap 4.
<header>
<div class="container-fluid">
<div class="row">
<div class="col-5 col-sm-4 col-md-5 col-lg-4 col-xl-4">
<img class="logo img-fluid" src="/img/logo.png" alt="logo">
</div>
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-3">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4">
<nav class="navbar navbar-expand-lg bg-none">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle Navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link home" href="#">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link security-services" href="#">SECURITY SERVICES</a>
</li>
<li class="nav-item">
<a class="nav-link contact-us" href="#">CONTACT US</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
</header>
/////////collapsed nav//////////
@media (min-width: 601px) and (max-width: 991px) {
.fa-bars {
transform: scale(2.2, 1.3);
-webkit-transform: scale(2.2, 1.3); /* Safari and Chrome */
-moz-transform: scale(2.2, 1.3); /* Firefox */
-ms-transform: scale(2.2, 1.3); /* IE 9+ */
-o-transform: scale(2.2, 1.3); /* Opera */
color: white;
margin: 15px -30px 10px 20px;
}
.navbar-nav {
background-color: white;
margin: 5px 50px 30px 0px;
}
.navbar-nav a {
color: #6d3093;
}
}
@media (max-width: 600px) {
.fa-bars {
transform: scale(2.0, 1.2);
-webkit-transform: scale(2.0, 1.2); /* Safari and Chrome */
-moz-transform: scale(2.0, 1.2); /* Firefox */
-ms-transform: scale(2.0, 1.2); /* IE 9+ */
-o-transform: scale(2.0, 1.2); /* Opera */
margin: 15px -30px 10px 20px;
}
.navbar-toggler {
color: white;
margin-right: 90px;
}
.navbar-nav {
background-color: white;
margin-top: 18px;
}
.navbar-nav a {
color: #6d3093;
}
html css3 bootstrap-4 navbar hamburger-menu
html css3 bootstrap-4 navbar hamburger-menu
asked Nov 22 '18 at 11:02
ZokesZokes
177
177
Can you show me the screenshot of your problem?
– Muhammad Tahseen ur Rehman
Nov 22 '18 at 13:09
It would be better if you recreate the problem in codepen or jsfiddle, also can you explain it a bit better?
– Nikola Kostov
Nov 26 '18 at 14:44
add a comment |
Can you show me the screenshot of your problem?
– Muhammad Tahseen ur Rehman
Nov 22 '18 at 13:09
It would be better if you recreate the problem in codepen or jsfiddle, also can you explain it a bit better?
– Nikola Kostov
Nov 26 '18 at 14:44
Can you show me the screenshot of your problem?
– Muhammad Tahseen ur Rehman
Nov 22 '18 at 13:09
Can you show me the screenshot of your problem?
– Muhammad Tahseen ur Rehman
Nov 22 '18 at 13:09
It would be better if you recreate the problem in codepen or jsfiddle, also can you explain it a bit better?
– Nikola Kostov
Nov 26 '18 at 14:44
It would be better if you recreate the problem in codepen or jsfiddle, also can you explain it a bit better?
– Nikola Kostov
Nov 26 '18 at 14:44
add a comment |
1 Answer
1
active
oldest
votes
Is this that you were looking for codepen
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-4 d-flex justify-content-center">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4 d-flex justify-content-end">
Not really, toggler is still all over the place when you click on it to collapse the navbar and it's also not in the right side corner as I want it to.
– Zokes
Nov 26 '18 at 16:51
Hey, I edited my answer, check now, if this isn't what you are looking for can you post an image of how it should look?
– Nikola Kostov
Nov 26 '18 at 17:13
This is how its suppossed to look like on mobile: imgur.com/xkZ835u imgur.com/yRnwy1D
– Zokes
Nov 27 '18 at 8:41
Hey Zokes, check the codepen link again, I edited it, see if this is what you need.
– Nikola Kostov
Nov 27 '18 at 9:04
Thx this helped a lot, still needs some tweakin in css on my part but it works fine now.
– Zokes
Nov 27 '18 at 9:30
|
show 1 more 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%2f53429499%2fnav-toggler-button-position-on-mobile-and-tablet-resolution%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
Is this that you were looking for codepen
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-4 d-flex justify-content-center">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4 d-flex justify-content-end">
Not really, toggler is still all over the place when you click on it to collapse the navbar and it's also not in the right side corner as I want it to.
– Zokes
Nov 26 '18 at 16:51
Hey, I edited my answer, check now, if this isn't what you are looking for can you post an image of how it should look?
– Nikola Kostov
Nov 26 '18 at 17:13
This is how its suppossed to look like on mobile: imgur.com/xkZ835u imgur.com/yRnwy1D
– Zokes
Nov 27 '18 at 8:41
Hey Zokes, check the codepen link again, I edited it, see if this is what you need.
– Nikola Kostov
Nov 27 '18 at 9:04
Thx this helped a lot, still needs some tweakin in css on my part but it works fine now.
– Zokes
Nov 27 '18 at 9:30
|
show 1 more comment
Is this that you were looking for codepen
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-4 d-flex justify-content-center">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4 d-flex justify-content-end">
Not really, toggler is still all over the place when you click on it to collapse the navbar and it's also not in the right side corner as I want it to.
– Zokes
Nov 26 '18 at 16:51
Hey, I edited my answer, check now, if this isn't what you are looking for can you post an image of how it should look?
– Nikola Kostov
Nov 26 '18 at 17:13
This is how its suppossed to look like on mobile: imgur.com/xkZ835u imgur.com/yRnwy1D
– Zokes
Nov 27 '18 at 8:41
Hey Zokes, check the codepen link again, I edited it, see if this is what you need.
– Nikola Kostov
Nov 27 '18 at 9:04
Thx this helped a lot, still needs some tweakin in css on my part but it works fine now.
– Zokes
Nov 27 '18 at 9:30
|
show 1 more comment
Is this that you were looking for codepen
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-4 d-flex justify-content-center">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4 d-flex justify-content-end">
Is this that you were looking for codepen
<div class="col-4 col-sm-5 col-md-5 col-lg-4 col-xl-4 d-flex justify-content-center">
<div class="tel-icon">
<img class="contact img-fluid" src="/img/contact.png" alt="contact-icon">
</div>
</div>
<div class="col-3 col-sm-3 col-md-2 col-lg-4 col-xl-4 d-flex justify-content-end">
answered Nov 26 '18 at 14:47
Nikola KostovNikola Kostov
353612
353612
Not really, toggler is still all over the place when you click on it to collapse the navbar and it's also not in the right side corner as I want it to.
– Zokes
Nov 26 '18 at 16:51
Hey, I edited my answer, check now, if this isn't what you are looking for can you post an image of how it should look?
– Nikola Kostov
Nov 26 '18 at 17:13
This is how its suppossed to look like on mobile: imgur.com/xkZ835u imgur.com/yRnwy1D
– Zokes
Nov 27 '18 at 8:41
Hey Zokes, check the codepen link again, I edited it, see if this is what you need.
– Nikola Kostov
Nov 27 '18 at 9:04
Thx this helped a lot, still needs some tweakin in css on my part but it works fine now.
– Zokes
Nov 27 '18 at 9:30
|
show 1 more comment
Not really, toggler is still all over the place when you click on it to collapse the navbar and it's also not in the right side corner as I want it to.
– Zokes
Nov 26 '18 at 16:51
Hey, I edited my answer, check now, if this isn't what you are looking for can you post an image of how it should look?
– Nikola Kostov
Nov 26 '18 at 17:13
This is how its suppossed to look like on mobile: imgur.com/xkZ835u imgur.com/yRnwy1D
– Zokes
Nov 27 '18 at 8:41
Hey Zokes, check the codepen link again, I edited it, see if this is what you need.
– Nikola Kostov
Nov 27 '18 at 9:04
Thx this helped a lot, still needs some tweakin in css on my part but it works fine now.
– Zokes
Nov 27 '18 at 9:30
Not really, toggler is still all over the place when you click on it to collapse the navbar and it's also not in the right side corner as I want it to.
– Zokes
Nov 26 '18 at 16:51
Not really, toggler is still all over the place when you click on it to collapse the navbar and it's also not in the right side corner as I want it to.
– Zokes
Nov 26 '18 at 16:51
Hey, I edited my answer, check now, if this isn't what you are looking for can you post an image of how it should look?
– Nikola Kostov
Nov 26 '18 at 17:13
Hey, I edited my answer, check now, if this isn't what you are looking for can you post an image of how it should look?
– Nikola Kostov
Nov 26 '18 at 17:13
This is how its suppossed to look like on mobile: imgur.com/xkZ835u imgur.com/yRnwy1D
– Zokes
Nov 27 '18 at 8:41
This is how its suppossed to look like on mobile: imgur.com/xkZ835u imgur.com/yRnwy1D
– Zokes
Nov 27 '18 at 8:41
Hey Zokes, check the codepen link again, I edited it, see if this is what you need.
– Nikola Kostov
Nov 27 '18 at 9:04
Hey Zokes, check the codepen link again, I edited it, see if this is what you need.
– Nikola Kostov
Nov 27 '18 at 9:04
Thx this helped a lot, still needs some tweakin in css on my part but it works fine now.
– Zokes
Nov 27 '18 at 9:30
Thx this helped a lot, still needs some tweakin in css on my part but it works fine now.
– Zokes
Nov 27 '18 at 9:30
|
show 1 more 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%2f53429499%2fnav-toggler-button-position-on-mobile-and-tablet-resolution%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
Can you show me the screenshot of your problem?
– Muhammad Tahseen ur Rehman
Nov 22 '18 at 13:09
It would be better if you recreate the problem in codepen or jsfiddle, also can you explain it a bit better?
– Nikola Kostov
Nov 26 '18 at 14:44