buttons problems when shrink the page - css

I'm trying to do this nav but when I shrink the page the buttons look terrible.
In desktop mode it works, and only when I shrink the page does it give me problems. The buttons become huge because if there is a long writing it goes to the head:
<section class="main_buttons">
<div class="container d-none d-sm-none d-md-block">
<div class="row">
<div class="col-xl-3 col-lg-3 col-md-3">
<div class="button">
<div class="nav_btn btn btn-primary">
<div class="contenitore">
three long words
<img src="assets/img/.." alt="">
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-3 col-md-3">
<div class="button">
<div class="nav_btn btn btn-primary">
<div class="contenitore">
testtest
<img src="assets/img/.." alt="">
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-3 col-md-3">
<div class="button">
<div class="nav_btn btn btn-primary">
<div class="contenitore">
testtesttest
<img src="assets/img/.." alt="">
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-3 col-md-3">
<div class="button">
<div class="nav_btn btn btn-primary">
<div class="contenitore">
test test test test
<img src="assets/img/..." alt="">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-3 col-lg-3 col-md-3">
<div class="button">
<div class="nav_btn btn btn-primary">
<div class="contenitore">
testtest test testtest
<img src="assets/img/.." alt="">
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-3 col-md-3">
<div
class="button">
<div class="nav_btn btn btn-primary sos-button">
<div class="contenitore">
test test test
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-3 col-md-3">
<div
class="button">
<div class="nav_btn btn btn-primary sos-button">
<div class="contenitore">
testtest test
</div>
</div>
</div>
</div>
</div>
</div>
HERE'S THE STYLE
.nav_btn {
text-align: left !important;
margin: 2px 0;
width: 100%;
background-color: white !important;
border:2px solid #0062CC;
padding-left: 10px;
font-size: 16px;
&:hover {
background-color: #0062CC !important;
}
&:hover a {
color:white !important;
}
.contenitore {
width:100%;
display: flex;
justify-content: space-between;
i {
line-height:20px;
}
img {
width: 20px;
}
a {
text-decoration: none;
color:#0062CC;
font-weight: bold;
}
}
}
}
.button .sos-button {
border: 2px solid #ff4081;
&:hover {
background-color: #ff4081 !important;
}
&:hover a {
color: white;
}
a {
color: #ff4081 !important;
}
}

Using width with border can sometimes make elements larger than you expect.
You can controlled the button width, out of the .nav_btn. I tried a lot of ways and i think these are the best solution for this situation.
.button {
width: 200px; //You can try like that way
}
.nav_btn {
text-align: left ;
margin: 2px;
background-color: white ;
border:2px solid #0062CC;
padding-left: 10px;
font-size: 16px;
}
.nav_btn:hover {
background-color: #0062CC ;
}
.nav_btn a:hover {
color:white ;
}
.contenitore {
display: flex;
justify-content: space-between;
}
i {
line-height:20px;
}
img {
width: 20px;
}
a {
text-decoration: none;
color:#0062CC;
font-weight: bold;
}
.button .sos-button {
border: 2px solid #ff4081;
}
.button .sos-button:hover {
background-color: #ff4081;
}
.button .sos-button:hover a {
color: white;
}
a {
color: #ff4081;
}
or try this one.
.nav_btn {
text-align: left ;
width: 200; //or you can try like this one
margin: 2px;
background-color: white ;
border:2px solid #0062CC;
padding-left: 10px;
font-size: 16px;
}
.nav_btn:hover {
background-color: #0062CC ;
}
.nav_btn a:hover {
color:white ;
}
.contenitore {
display: flex;
justify-content: space-between;
}
i {
line-height:20px;
}
img {
width: 20px;
}
a {
text-decoration: none;
color:#0062CC;
font-weight: bold;
}
.button .sos-button {
border: 2px solid #ff4081;
}
.button .sos-button:hover {
background-color: #ff4081;
}
.button .sos-button:hover a {
color: white;
}
a {
color: #ff4081;
}

Related

Banner image not shown in angular page

I am still learning about angular so I might not have the best design, but anyways I get confused not being so sure where my css should be. I have src/index.html, styles.css and src/app/app.component.html, app.component.html. I am trying to customize home.component.html, no home.component.css has been implemented. On .parallax-container I am trying to show an image, but not showing as a background image.
src/styles.css
div.sm-jumbotron {
padding: 2rem;
background-color: #38547b;
color: #ffffff;
}
button.btn-submit {
background-color: #38547b;
color: #ffffff;
width: 100%;
}
button.btn-submit:focus, button.btn-submit:hover {
background-color: #38547b;
}
input.ng-invalid.ng-dirty {
border-bottom-color: #e91e63 !important;
box-shadow: 0 1px 0 0 #e91e63 !important;
}
nav ul a,
nav .brand-logo {
color: #444;
}
p {
line-height: 2rem;
}
.sidenav-trigger {
color: #26a69a;
}
.parallax-container {
min-height: 380px;
line-height: 0;
height: auto;
color: rgba(0, 0, 0, 0.9);
}
.parallax-container .section {
width: 100%;
}
#media only screen and (max-width : 992px) {
.parallax-container .section {
position: absolute;
top: 40%;
}
#index-banner .section {
top: 10%;
}
}
#media only screen and (max-width : 600px) {
#index-banner .section {
top: 0;
}
}
.icon-block {
padding: 0 15px;
}
.icon-block .material-icons {
font-size: inherit;
}
footer.page-footer {
margin: 0;
}
app.component.html
<div class="container" [style.margin-top.px]="navbarTopMargin">
<app-nav (navHeight)="onNavHeight($event)"></app-nav>
</div>
<div id="container">
<div class="my-custom-container" [style.margin-top.px]="routerOutput">
<router-outlet></router-outlet>
</div>
</div>
home.component.html
<div id="index-banner" class="parallax-container">
<div class="section no-pad-bot">
<div class="container">
<br><br>
<h1 class="header center teal-text text-lighten-2">Join Us</h1>
<div class="row center">
<h3 class="header col s12 light">We sell and deliver products to customers that will improve health.</h3>
</div>
<div class="row center">
Get Started
</div>
</div>
</div>
<!--Show this image-->
<div class="parallax"><img src="https://mdbootstrap.com/img/Photos/Others/architecture.jpg" alt=""></div>
</div>
<div class="container">
<div class="section">
<div class="row">
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">flash_on</i></h2>
<h3 class="center">Fast delivery</h3>
<p class="light">
We are the fastest delivery service in America.
</p>
</div>
</div>
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">group</i></h2>
<h3 class="center">Top quality</h3>
<p class="light">
We make sure the quality is great.
</p>
</div>
</div>
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">location_city</i></h2>
<h3 class="center">Trusted company</h3>
<p class="light">
This company has received 98% satisfaction.
</p>
</div>
</div>
</div>
Please try this css in your style.css:
.parallax-container .parallax{
position: static;
}
.parallax-container .parallax img{
position: static;
transform: none;
display: block;
max-width: 100%;
}

Why is <ul> getting out of the box when padding is set to zero?

This containers are arranged using nested flexbox. When I added an unordered list with zero padding, it got outside the child container. Not only that it also goes outside the parent container.
:root {
--main-bg-color: #3D3E5D;
--bg-color-red: #F06D4F;
--bg-color-aqua: #2DA6A4;
--bg-color-orange: #EFB85E;
--txt-color-primary: black;
--txt-color-secondary: white;
--heading: 3rem;
--sub-heading: 2rem;
--normal: 1rem;
--small: 0.5rem;
--main-padding: 10px;
}
* {
margin: none;
padding: 0;
box-sizing: border-box;
}
.container__main {
width: 90%;
margin: auto;
}
.container__flex {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.flex__box {
font-weight: 900;
font-size: var(--normal);
background-color: aqua;
flex: 0 0 calc(50% - 10px);
}
.red {
background-color: red;
}
.gray {
background-color: gray;
}
.container__main>.container__flex {
margin-bottom: 10px;
}
.container__flex>.flex__box {
padding: var(--main-padding);
}
.p-0 {
padding: 0 !important;
}
<div class="container__main">
<div class="container__flex">
<div class="flex__box">
<b></b>
<span class="heading">W</span>eb <span class="heading">A</span>pplication <span class="heading">T</span>echnologies
</div>
<div class="flex__box gray">
<div class="container__flex">
<div class="flex__box p-0 red">
<span class="sub-heading">Links</span>
<ul>
<li>Chubkins</li>
<li>W3 Schools</li>
<li>Learn Web Dev</li>
<li>Colour Reference</li>
</ul>
</div>
<div class="flex__box p-0 red">
</div>
</div>
</div>
</div>
<div class="container__flex">
<div class='flex__box'>
box1
</div>
<div class='flex__box'>
box2
</div>
</div>
</div>
Picture of the mentioned problem: https://prnt.sc/plgv0y
If you want to help me debug this view this codepen link:
https://codepen.io/bishant-bhattarai/pen/qBBqqYE
Since this was a small project I didn't add any comments, sorry for inconvineince.
This is probably due to the default value of the CSS property list-style-position.
You can try and change that like this:
:root {
--main-bg-color: #3D3E5D;
--bg-color-red: #F06D4F;
--bg-color-aqua: #2DA6A4;
--bg-color-orange: #EFB85E;
--txt-color-primary: black;
--txt-color-secondary: white;
--heading: 3rem;
--sub-heading: 2rem;
--normal: 1rem;
--small: 0.5rem;
--main-padding: 10px;
}
* {
margin: none;
padding: 0;
box-sizing: border-box;
}
.container__main {
width: 90%;
margin: auto;
}
.container__flex {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.flex__box {
font-weight: 900;
font-size: var(--normal);
background-color: aqua;
flex: 0 0 calc(50% - 10px);
}
.red {
background-color: red;
}
.gray {
background-color: gray;
}
.container__main>.container__flex {
margin-bottom: 10px;
}
.container__flex>.flex__box {
padding: var(--main-padding);
}
.p-0 {
padding: 0 !important;
}
ul {
list-style-position: inside;
}
<div class="container__main">
<div class="container__flex">
<div class="flex__box">
<b></b>
<span class="heading">W</span>eb <span class="heading">A</span>pplication <span class="heading">T</span>echnologies
</div>
<div class="flex__box gray">
<div class="container__flex">
<div class="flex__box p-0 red">
<span class="sub-heading">Links</span>
<ul>
<li>Chubkins</li>
<li>W3 Schools</li>
<li>Learn Web Dev</li>
<li>Colour Reference</li>
</ul>
</div>
<div class="flex__box p-0 red">
</div>
</div>
</div>
</div>
<div class="container__flex">
<div class='flex__box'>
box1
</div>
<div class='flex__box'>
box2
</div>
</div>
</div>
cf. https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-position

Buttons inside three divs won't center

What I am trying to do is when the max width of a screen is 750px I want the buttons inside of my side-bar to be centered both vertically and horizontally using flexbox. Here is what I have tried:
.side-bar {
height: calc(100vh - 55px);
width: 18.5%;
background-color: #F5F5F5;
overflow: auto;
}
.side-bar .content {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
padding-top: 30px;
box-sizing: border-box;
}
.side-bar .button {
margin-bottom: 5px;
}
.side-bar .button:hover i {
color: dodgerblue;
}
.side-bar .button div {
text-align: left;
}
.side-bar .button form {
display: flex;
}
.side-bar .button a {
align-self: center;
margin-left: 12%;
margin-right: 5%;
}
.side-bar .button a i {
color: black;
font-size: 18px;
transition: 0.3s;
}
.side-bar .button input {
border: none;
font-size: 15px;
background-color: Transparent;
}
.side-bar .button input:active {
color: black;
}
.side-bar .sub-title {
margin-left: 12%;
}
.side-bar .sub-title p {
color: #6C6C6D;
font-weight: bold;
font-size: 14px;
}
#media (max-width: 750px) {
.side-bar .content {
justify-content: center;
}
.side-bar .button input {
display: none;
}
.side-bar .sub-title {
display: none;
}
}
<div class="side-bar">
<div class="content">
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-tachometer-alt"></i>
<input type="submit" value="Dashboard">
</form>
</div>
</div>
<div class="sub-title">
<p>TOOLS</p>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-minus-circle"></i>
<input type="submit" value="Ban Panel">
</form>
</div>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-exclamation-circle"></i>
<input type="submit" value="Warn Panel">
</form>
</div>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-gift"></i>
<input type="submit" value="Gift Panel">
</form>
</div>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-user"></i>
<input type="submit" value="User Info">
</form>
</div>
</div>
<div class="sub-title">
<p>NEWS</p>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-newspaper"></i>
<input type="submit" value="News Panel">
</form>
</div>
</div>
</div>
</div>
When when I use justify-content on my content div the children of the content div aren't centered. I would like the buttons centered both vertically and horizontally.
Note on potential duplicates
Before anyone marks this a duplicate, it's not. I looked at the solutions to my last post about it being a duplicate for the same reason and it's not.
How my post is different from my previous post: My previous post I was trying to center a div inside a div, that didn't work out so I tried a different approach and got my result that I wanted. Now, I am trying to center my div inside three other divs but do not understand what it is not centering after using flexbox to center it.
I believe below solution fixes your issue. Content was a little off to the bottom, because .content had only padding-top: 30px, which I changed to padding: 30px 0. I also removed display: none rules, because then, well, nothing was inside this sidebar.
Key part
.side-bar .content {
...
padding: 30px 0;
...
}
Snippet
.side-bar {
height: calc(100vh - 55px);
width: 18.5%;
background-color: #F5F5F5;
overflow: auto;
}
.side-bar .content {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
padding: 30px 0;
box-sizing: border-box;
}
.side-bar .button {
margin-bottom: 5px;
}
.side-bar .button:hover i {
color: dodgerblue;
}
.side-bar .button div {
text-align: left;
}
.side-bar .button form {
display: flex;
}
.side-bar .button a {
align-self: center;
margin-left: 12%;
margin-right: 5%;
}
.side-bar .button a i {
color: black;
font-size: 18px;
transition: 0.3s;
}
.side-bar .button input {
border: none;
font-size: 15px;
background-color: Transparent;
}
.side-bar .button input:active {
color: black;
}
.side-bar .sub-title {
margin-left: 12%;
}
.side-bar .sub-title p {
color: #6C6C6D;
font-weight: bold;
font-size: 14px;
}
#media (max-width: 750px) {
.side-bar .content {
justify-content: center;
}
.side-bar .button input
}
.side-bar .sub-title {
}
}
<div class="side-bar">
<div class="content">
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-tachometer-alt"></i>
<input type="submit" value="Dashboard">
</form>
</div>
</div>
<div class="sub-title">
<p>TOOLS</p>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-minus-circle"></i>
<input type="submit" value="Ban Panel">
</form>
</div>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-exclamation-circle"></i>
<input type="submit" value="Warn Panel">
</form>
</div>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-gift"></i>
<input type="submit" value="Gift Panel">
</form>
</div>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-user"></i>
<input type="submit" value="User Info">
</form>
</div>
</div>
<div class="sub-title">
<p>NEWS</p>
</div>
<div class="button">
<div>
<form action="http://google.com">
<i class="fas fa-newspaper"></i>
<input type="submit" value="News Panel">
</form>
</div>
</div>
</div>
</div>

Page overflowing from the right margin

This is my css code.
nav.navbar {
color: white !important;
background-color: #d82c2e;
font-weight: bold;
}
html {
margin-right: 70px !important;
}
.introSec {
height: 750px;
}
.hr {
width: 100px;
border-top: 1px solid red;
}
.navbar-flat li a:focus,
.navbar-flat li a:hover,
.navbar-flat li.active a,
.navbar-brand {
background-color: #c12728;
color: #fff;
}
.navbar-flat a {
transition: all .3s ease-in, 1s;
}
nav.navbar {
padding-left: 35%;
}
.nav-link {
color: #fff;
/*font-size:calc(15px + 0.6vw);*/
}
.navbar-brand {
color: white;
}
.introLine {
text-align: center;
padding-top: 30px;
font-size: calc(15px + 0.6vw);
}
.pieImage {
border-radius: 100%;
margin: 40px 45%;
height: calc(20% + 0.6vw);
min-width: calc(13% + 0.6vw);
}
.pieImage2 {
border-radius: 100%;
margin-top: 20px;
width: 300px !important;
height: 600;
display: inline-block;
}
.coolOne {
margin-left: 17%;
}
#landing-header {
margin-top: -80px;
}
.myName {
text-align: center;
color: white;
font-family: Lato, sans-serif;
letter-spacing: -2px;
}
.title {
text-align: center;
color: black;
word-spacing: 3px;
padding: 10px;
margin: 15px auto;
font-family: 'Pontano Sans', sans-serif;
font-size: calc(30px + 0.6vw);
}
.firstSec {
background-color: #d82c2e;
height: 725px;
}
.aboutTitle {
text-align: center;
color: #d82c2e;
font-family: Lato, sans-serif;
font-weight: 700;
font-size: 30px;
}
.firstSec {
margin-top: 57px;
}
.aboutIntro {
text-align: center;
font-family: Lato, sans-serif;
}
.aboutMe {
padding: 20px 90px 0 90px;
}
.activities-inner {
padding-top: 50px;
margin: 50px;
width: 100%;
}
.activities {
border: 1px solid #e3e5e5;
display: inline;
padding: 50px;
}
.column {
float: left;
width: 25%;
border: 1px solid lightgray;
height: 200px;
text-align: center;
}
.row:after {
content: "";
display: table;
clear: both;
}
.column {
font-weight: 500;
font-size: 30px;
padding-top: 30px;
}
.icon {
font-size: 40px;
color: #d82c2e;
}
.technicalSkills {
text-align: center;
font-family: Lato, sans-serif;
}
.thirdSec {
background-color: #d82c2e;
}
.technicalSkills {
margin-top: 50px;
color: white;
padding-top: 20px;
}
.portfolioHeading {
text-align: center;
color: #d82c2e;
font-weight: 700;
font-family: 700;
font-size: 30px;
}
.hr {
margin-top: 20px;
color: #d82c2e;
}
.portfolioPic {
margin: 20px 35%;
width: 30%;
}
.text-center {
display: flex;
flex-wrap: wrap;
}
.lastHr {
float: left;
}
.contact {
text-align: center;
}
.lastSec {
background-color: #d82c2e;
margin-top: 20px;
}
.contactDetails {
padding-top: 20px;
}
.white {
color: white;
}
.space {
padding-top: 5px;
}
.row {
padding-left: 100px;
padding-right: 130px;
}
.dev {
font-size: calc(18px + 1.0vw);
}
.secondDev {
font-size: calc(15px + 0.6vw);
}
#landing-header {
z-index: 1;
position: relative;
text-align: center;
padding-top: 40vh;
}
#landing-header h1 {
color: #fff;
}
.slideshow {
position: inherit;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 0;
list-style: none;
margin: 0;
margin-top: -23.1%;
padding: 0;
}
.slideshow li {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-size: cover;
background-position: 50% 50%;
background-repeat: no-repeat;
opacity: 0;
z-index: 0;
animation: imageAnimation 50s linear infinite;
}
.slideshow li:nth-child(1) {
background-image: url(https://bearlake.org/wp-
content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg)
}
.slideshow li:nth-child(2) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 10s;
}
.slideshow li:nth-child(3) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 20s;
}
.slideshow li:nth-child(4) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 30s;
}
.slideshow li:nth-child(5) {
background-image: url(https://bearlake.org/wp-content/uploads/cache/images/garden-city-logan-campgrounds/garden-city-logan-campgrounds-987998613.jpg);
animation-delay: 40s;
}
#keyframes imageAnimation {
0% {
opacity: 0;
animation-timing-function: ease-in;
}
10% {
opacity: 1;
animation-timing-function: ease-out;
}
20% {
opacity: 1
}
30% {
opacity: 0
}
}
.no-cssanimations .slideshow li {
opacity: 1;
}
.nav-link {
color: white !important;
}
.navbar-toggler {
border-color: white;
/*margin-left: -50%;*/
}
.navbar-fixed-top {
top: 0;
}
.navbar-light .navbar-toggler {
border-color: transparent !important;
}
<div class="row">
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-code"> </i> </p>
<h3 class="dev"> DEVELOPMENT </h3>
</div>
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-music"></i>
</p>
<h3 class="dev"> MUSIC </h3>
</div>
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-basketball-ball"></i>
</p>
<h3 class="dev"> TENNIS </h3>
</div>
<div class="column col-lg-3 col-md-6 col-sm-12">
<p class="icon">
<i class="fas fa-book"></i>
</p>
<h3 class="dev"> BOOKS </h3>
</div>
</div>
</div>
<div id="scrollToThird">
</section>
<!-- Third Sec Starts here -->
<section class="thirdSec">
<h2 class="technicalSkills"> TECHNICAL SKILLS </h2>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol id="scrollToFourth" class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active coolOne">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./htmlPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./cssPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./javascriptPercent2.jpg">
</div>
<div class="carousel-item coolOne">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./nodejsPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./expressPercent2.jpg">
<img class="pieImage2 col-lg-4 col-md-4 col-sm-12" src="./javascriptPercent2.jpg">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
</div>
<section class="fourthSec">
<hr class="hr">
<h2 class="portfolioHeading"> PORTFOLIO </h2>
<div class="container">
<div class="row text-center" style="display:flex; flex-wrap: wrap;">
<div class="col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./screencapture-lit-mesa-98519-herokuapp-1518954523255.png" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Yelp Camp</h4>
</div>
Check it out!
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./screencapture-dry-castle-83141-herokuapp-blogs-1519047247719.png" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Blog Site</h4>
</div>
Check it out!
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./screencapture-whispering-hamlet-69416-herokuapp-results-1519112901364.png" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Seach Any Movie</h4>
</div>
Check it out!
</div>
</div>
<div class="space col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./IMG_3717.PNG" width="80" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> 101 WeirdFunFacts </h4>
</div>
Check it out!
</div>
</div>
<div class="space col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./IMG_3718.PNG" width="80" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Flash Card</h4>
</div>
Check it out!
</div>
</div>
<div class="space col-lg-4 col-md-6">
<div class="img-thumbnail">
<img src="./IMG_3719.PNG" width="80" class="img-fluid">
<div class="caption">
<h4 class="secondDev"> Algebraic Equations </h4>
</div>
Check it out!
<div id="scrollToFifth">
</div>
</div>
</div>
</div>
</div>
</section>
<section class="lastSec">
<h2 class="contactDetails"> CONTACT DETAILS </h2>
<hr class="col-lg-4 col-md-4 col-sm-4 col-xs-2 lastHr">
<br>
<br>
<div class="contact">
<h5 class="white"> Email: </h5>
<p> —————————————— </p>
<h5 class="white"> Contact Number: </h5>
<p> ——————————— </p>
<h5 class="white"> Address: </h5>
<p> ———————————— </p>
</div>
</section>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<p> assasa </p>
<% include partials/footer %>
<% include partials/header %>
<section class="introSec">
<!--<div id="landing-header">-->
<div id="landing-header">
<h1>Hi, I am Neymat Kakar</h1>
<h4> Web/IOS Developer In Dubai </h4>
</div>
<ul class="slideshow">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</section>
<div id="scrollTo">
<section class="firstSec">
<nav class="navbar navbar-expand-lg navbar-flat navbar-light">
<!--<a class="navbar-brand" href="#srcollTo">HOME </a>-->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="#scrollTo">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToSec">ABOUT</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToThird">SKILLS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToFourth">PORTFOLIO</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#scrollToFifth">CONTACT</a>
</li>
</ul>
</div>
</nav>
<img class="pieImage" src="./IMG_8224.jpg">
<h1 class="myName"> NEYMAT KAKAR </h1>
<h3 class="introLine"> CREATIVE - PROFESSIONAL - PASSIONATE</h3>
<h5 class="col-lg-12 col-md-12 col-sm-12 col-xs-12 title"> WEB/IOS APP DEVELOPER</h5>
<div id="scrollToSec">
</section>
</div>
<!-- Second Section Starts Below -->
<section class="secSec">
<hr class="hr">
<h3 class="aboutTitle"> HERE'S WHAT I'M DOING </h3>
<!--<p class = "aboutIntro"> I introduce the most creative and original ideas for my company </p>-->
<p class="aboutMe"> “I am a simple person with great passion for web development. I have been in the field now for quite some time, and have been loving every minute of it. I am also a part-time blogger and avid reader of non-fiction and overall thinker. I also enjoy
going out to local meetups, events and descent clubs to interact with people from various walks of life.” </p>
Please go through the image. This is how my page looks like.
Notice from navbar section, the margin on the right is way out. I need all the sections to have the same margin and the page not to overflow.
I think problem with your html and body margin. Remove margin-right to your html to tag.
Try to set below css
html,body {
width: 100%;
height: 100%;
margin: 0;
padding:0;
overflow-x:hidden;
}
Inside the html if you're using bootstrap go-through about bootstrap container class to get left and right space.

Bootstrap - Button being pushed down a row

I'm having issues with my bootstrap code. When I re-size the screen the button is being pushed down outside of the row and container. It seems the container class isn't even being used. Where did I go wrong here? Thank you.
#cta-center {
line-height: 90px;
}
#cta-bg {
background: gray;
height: 90px;
}
.cta p {
text-align: center;
font-size: 35px;
font-weight: 600;
color: #fff;
}
.btn-primary {
width: 200px;
height: 50px;
background: yellow;
}
.btn-primary p {
color: #000;
line-height: 34px;
font-size: 25px;
font-weight: 600;
}
<div id="cta-center">
<div id="cta-bg">
<div class="container">
<div class="row">
<div class="cold-md-12">
<div class="col-md-8">
<div class="cta">
<p>Get a FREE Quote NOW</p>
</div>
</div>
<div class="col-md-4">
<a href="#" class="btn btn-primary">
<p>CLICK HERE</p>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
Image:

Resources