How can make a space between logo and nav bar? - html

I want to make header like on the photo:
Now it looks like that:
header
Here is the html code:
<header class="header">
<div class="container">
<nav class="navBar">
<div class="navBar-wrapper">
<div class="img-logo">
<img src="./img/logo.jpg" alt="" srcset=""></div>
<div class="home">Home</div>
<div class="aboutUs">About us</div>
<div class="findSpace">Find space</div>
<div class="share-space">Share space</div>
<div class="promoteSpace">Promote space</div>
</div>
</nav>
</div>
</header>
And here is css:
Is there any way to add space between logo and move the navigation to the left?
body{
font-family:"Poppins",sans-serif;
font-weight: 400;
}
.container{
max-width: 1110px;
margin-left: auto;
margin-right: auto;
}
.header{
height: 112px;
width: 100%;
background: #fff;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
.navBar-wrapper{
display: flex;
align-items: center;
justify-content: space-between;
}
.navBar-wrapper div{
font-size: 16px;
line-height: 24px;
color: #323232;
margin-top: 28px;
}
.home{
font-weight: 700 !important;
color:#F78434 !important;
}
How can I make a space between logo and nav?
Tried to access second child using nth-child(2), but that didn't work.
Code snippet: https://codesandbox.io/s/agitated-davinci-1dqujt?file=/index.html

You can do that by simply applying margin-right: auto; to the img-logo-container.
Note that this will affect the parent containers justify-content: space-between;, so I would suggest applying another CSS-property such as gap: 10px; to navBar-wrapper.
Alternatively, you could wrap all the links in the navbar inside another container for better control in your navbar.
body {
font-family: "Poppins", sans-serif;
font-weight: 400;
}
.img-logo img {
max-width: 100px;
}
.img-logo {
margin-right: auto;
}
.container {
max-width: 1110px;
margin-left: auto;
margin-right: auto;
}
.header {
height: 112px;
width: 100%;
background: #fff;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
.navBar-wrapper {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.navBar-wrapper div {
font-size: 16px;
line-height: 24px;
color: #323232;
margin-top: 28px;
}
.home {
font-weight: 700 !important;
color: #F78434 !important;
}
<header class="header">
<div class="container">
<nav class="navBar">
<div class="navBar-wrapper">
<div class="img-logo">
<img src="https://4m4you.com/wp-content/uploads/2020/06/logo-placeholder.png" alt="" srcset=""></div>
<div class="home">Home</div>
<div class="aboutUs">About us</div>
<div class="findSpace">Find space</div>
<div class="share-space">Share space</div>
<div class="promoteSpace">Promote space</div>
</div>
</nav>
</div>
</header>

Related

How to stretch to fill its container space?

In navbar are 3 links which have wrapper div element, problem is cus that links inside of div are not stretched. Check the screenshot - I need to hit link to navigate between pages:
I want to that links in nav to stretch space like with and heigh 100%;
This is css of navbar
.header {
display: flex;
align-items: center;
justify-content: space-between;
height: 100px;
color: var(--color-white);
background-color: var(--color-black);
.user-nav {
display: flex;
align-items: center;
&-item {
width: 118px;
font-size: 20px;
font-weight: 500;
line-height: 30px;
text-align: center;
color: var(--color-grey);
}
&-item-active {
width: 118px;
font-size: 20px;
font-weight: 500;
line-height: 30px;
text-align: center;
color: var(--color-grey);
box-shadow: inset 0 -4px 0 var(--color-red); // made border bottom inside of element
}
&-item-link {
text-decoration: none;
color: inherit;
}
}
.logo {
width: 30px;
position: absolute;
left: 50%;
transform: translateX(-50%);
img {
width: 100%;
}
}
}
Html of navbar:
<header className="header">
<nav className="user-nav">
<div className={this.handleActiveRoute('/', activeRoute)}>
<Link href="/">
<a className="user-nav-item-link">Dashboard</a>
</Link>
</div>
<div className={this.handleActiveRoute('/search', activeRoute)}>
<Link href="/search">
<a className="user-nav-item-link">Search</a>
</Link>
</div>
<div className={this.handleActiveRoute('/collections', activeRoute)}>
<Link href="/collections">
<a className="user-nav-item-link">Collections</a>
</Link>
</div>
</nav>
<div className="logo">
<img src={Logo} alt="logo" />
</div>
<div className="user-nav-icon">
<div className="user-nav-icon-notification">
<span className="icon-bell-o" />
</div>
<div className="user-nav-icon-settings">
<span className="icon-cog" />
</div>
</div>
</header>
How to make a links inside of divs to have 100% width and height?
'display: block' on links probably helps

Need help placing divs on top of each other and placing the last one at the bottom

I am trying to build a page and I want the last div to be at the bottom but the one on top of it (second to the last) to have a vertical scrollbar on resize or when the elements don't fit. Here is a link to my jsfiddle (https://jsfiddle.net/tgz98s6w/) where you can see that the second to the last div overlaps with the last one sometimes and I want to avoid that.
I tried setting:
#windowsStoreBox {
position: absolute;
bottom: 0;
}
But it does not seem to work.
Thank you
/*
CSS File for Sharebox
*/
html,body {
margin: 0;
padding: 0;
background-color: #000000;
color: #FFFFFF;
overflow: hidden;
width:auto;
font: 15px "Segoe UI", "Tahoma";
border: 0.05em solid #535353;
cursor: default;
-webkit-user-select: none;
}
/* SCROLLBAR */
::-webkit-scrollbar {
width: 10px;
background-color: #747474;
opacity: 0.93;
}
::-webkit-scrollbar-track {
background: #171717;
}
::-webkit-scrollbar-thumb {
background: #454545;
}
::-webkit-scrollbar-thumb:hover {
background: #747474;
}
::-webkit-scrollbar-button:start {
height: 10px;
width: 10px;
background-color: #171717;
background-image: url('../buttons/angle_up.svg');
background-repeat: no-repeat;
background-size: 10px 6px;
background-position: center center;
border: none;
}
::-webkit-scrollbar-button:start:active {
background-color: #A2A2A2;
background-image: url('../buttons/angle_up_active.svg');
}
::-webkit-scrollbar-button:end {
height: 10px;
width: 10px;
background-color: #171717;
background-image: url('../buttons/angle_down.svg');
background-repeat: no-repeat;
background-size: 10px 6px;
background-position: center center;
border: none;
display: block;
}
::-webkit-scrollbar-button:end:active {
background-color: #A2A2A2;
background-image: url('../buttons/angle_down_active.svg');
}
/* END SCROLLBAR */
/* TITLEBAR */
.titlebar {
display: block;
position: relative;
height: 32px;
width: 100%;
overflow: hidden;
padding: 0;
-webkit-user-select: none;
cursor: context-menu;
background-color: #000000;
color: #CCCCCC;
}
.titlebar.titlebarLight {
background-color: #E6E6E6;
color: #2A2A2A;
}
.titlebarDarkBlur {
background-color: #3B3B3F;
}
.titlebarLightBlur {
background-color: #CCCCCC;
}
.titlebar.draggable {
-webkit-app-region: drag;
}
.titlebar-title {
float: left;
text-align: left;
font-size: 12px;
font-weight: light;
margin-left:36px;
margin-top:8px;
-webkit-user-select: none;
width: 70%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.titlebarTitleDarkBlur {
color: #CCCCCC;
}
.titlebarTitleLightBlur {
color: #838487;
}
.titlebar-controls {
float: right;
text-align: left;
}
.titlebar:after,
.titlebar-controls:after {
content: ' ';
display: table;
clear: both;
}
.titlebar-minimize,
.titlebar-resize,
.titlebar-close {
float: left;
width: 45px;
height: 31px;
margin: 1px 1px 0 0;
text-align: center;
line-height: 29px;
-webkit-transition: background-color .2s;
}
span.titlebar-icon {
font-family: "Segoe MDL2 Assets";
font-size: 10px;
color: #FFF;
}
span.titlebar-icon-light {
color: #000;
}
.titlebar.draggable .titlebar-close {
-webkit-app-region: no-drag;
}
.titlebar-close:hover {
background-color: rgba(232, 17, 35, 0.9);
}
/* END TITLEBAR */
/* SHAREBOX */
#shareBox {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding-bottom: 1em;
padding-top: 0em;
height: 60px;
max-height: 60px;
overflow: none;
}
#shareBox div {
padding-bottom: 0.3em;
}
#shareBoxText {
font-size: 1.05em;
/* font-weight normal is 400, and bold is 700, so we want something in between */
font-weight: 600;
}
#shareBoxFileName {
font-size: 0.87em;
}
#shareBoxSubText {
color: #A2A2A2;
font-size: 0.87em;
}
div.shareBoxSeparator {
padding-top: 0.25em;
padding-bottom: 0;
margin-bottom: 0;
}
.shareBoxSeparator.padded {
padding-left: 15px;
padding-right: 15px;
}
div.shareBoxSeparator hr {
height: 1px;
background-color: #A2A2A2;
border: none;
padding-bottom: 0;
margin-bottom: 0;
}
/* END SHAREBOX */
/* SERVICES BOX */
#servicesBox {
/* Add scrolling. The window will be of a fixed height */
position: fixed;
padding-top: 0.3em;
padding-bottom: 0;
overflow-y: auto;
overflow-x: none;
height: calc(100% - (32px + 60px + 33px));
max-height: calc(100% - (32px + 60px + 33px));
}
#servicesBoxSocial {
display: inline-flex;
flex-wrap: wrap;
justify-content: center;
/*flex-direction: row;*/
}
.shareService {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 66px;
height: 84px;
}
.shareServiceLogoBox {
background-color: #6A68D6;
width: 40px;
height: 40px;
margin-bottom: 0.25em;
/* Align logos to the center */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.shareServiceLogoImage {
width: 20px;
height: 20px;
}
.shareServiceDescription {
font-size: 0.825em;
}
.shareService:hover {
background-color: #2E2E2E;
}
/* END SERVICES BOX */
/* WINDOWS STORE BOX */
#windowsStoreBox {
position: absolute;
bottom: 0;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 0.25em 0;
font-size: 0.81em;
border-bottom: 0.05em solid #535353;
height: 32px;
max-height: 32px;
overflow: none;
}
#windowsStoreBox:hover {
color: #A2A2A2;
}
#windowsStoreBox:hover g {
fill: #A2A2A2;
}
svg.windowsStoreLogo {
padding: 0 3px;
vertical-align: middle;
position: relative;
top: -2px;
}
/* END WINDOWS STORE BOX */
<!DOCTYPE html>
<html>
<head>
<title>Share</title>
<link rel="stylesheet" href="static/css/sharebox.css">
</head>
<body >
<!-- TITLEBAR -->
<div id="titlebar" class="titlebar draggable">
<div id='titlebar-title' class="titlebar-title"></div>
<div id='titlebar-controls' class="titlebar-controls">
<div id='titlebar-close' class="titlebar-close" title='Close'>
<span class='titlebar-icon'></span>
</div>
</div>
</div>
<!-- END TITLEBAR -->
<!-- DESCRIPTION BOX -->
<div id='shareBox'>
<div id='shareBoxText'>Share</div>
<div id='shareBoxFileName' data-attr-filelocation='static/img/blank.svg'>tutankhamun.jpg</div>
<div id='shareBoxSubText'>This item will be shared.</div>
</div>
<!-- END DESCRIPTION BOX -->
<!--<div class='shareBoxSeparator padded'><hr /></div>-->
<!-- SERVICES BOX -->
<!-- This box allows you to share on facebook, twitter e.t.c -->
<div id='servicesBox'>
<!-- Add links to social media services and mail, onenote e.t.c -->
<div id='servicesBoxSocial'>
<!-- All services here -->
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/CopyFileLogo.svg' /></div>
<div class='shareServiceDescription'>Copy file</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/CopyLinkLogo.svg' /></div>
<div class='shareServiceDescription'>Copy link</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/MailLogo.svg' /></div>
<div class='shareServiceDescription'>Instagram</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/MailLogo.svg' /></div>
<div class='shareServiceDescription'>Mail</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/MailLogo.svg' /></div>
<div class='shareServiceDescription'>Feedback</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/OneNoteLogo.svg' /></div>
<div class='shareServiceDescription'>OneNote</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/MailLogo.svg' /></div>
<div class='shareServiceDescription'>Snip & Sketch</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/SkypeLogo.svg' /></div>
<div class='shareServiceDescription'>Skype</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/FacebookLogo.svg' /></div>
<div class='shareServiceDescription'>Facebook</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/TwitterLogo.svg' /></div>
<div class='shareServiceDescription'>Twitter</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/RedditLogo.svg' /></div>
<div class='shareServiceDescription'>Reddit</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/PinterestLogo.svg' /></div>
<div class='shareServiceDescription'>Pinterest</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/FacebookMessengerLogo.svg' /></div>
<div class='shareServiceDescription'>Messenger</div>
</div>
<div class='shareService'>
<div class='shareServiceLogoBox'><img class='shareServiceLogoImage' src='static/shareAppImages/WhatsAppLogo.svg' /></div>
<div class='shareServiceDescription'>WhatsApp</div>
</div>
</div>
</div>
<!-- END SERVICES BOX -->
<!--<div class='shareBoxSeparator' style='padding:0;'><hr /></div>-->
<!-- WINDOWS STORE BOX -->
<div id='windowsStoreBox'>
<p>
<svg class='windowsStoreLogo' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 210 210" width="18px" height="18px"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,210v-210h210v210z" fill="none"/><g fill="#ffffff"><g id="surface1"><path d="M90.36255,26.32691c-1.56372,0.10254 -3.15307,0.43579 -4.7168,0.94848l-13.125,4.35791c-8.02368,2.69165 -13.45825,10.25391 -13.45825,18.68774v21.58447l-26.25,3.69141v98.18116l118.125,16.53442l26.25,-8.66455v-113.15186l-26.25,-9.43359l-13.125,1.8457v-8.4082c0,-9.92066 -7.51098,-17.81616 -16.56006,-19.37988c-3.02491,-0.5127 -6.20362,-0.33325 -9.35669,0.71777l-3.74267,1.2561c-3.05054,-4.46045 -7.8186,-7.61352 -13.15063,-8.53638c-1.51245,-0.25634 -3.05054,-0.33325 -4.6399,-0.23071zM91.43921,39.375c3.76831,-0.35888 6.99829,2.48657 6.99829,6.5625v20.48218l-26.25,3.66577v-19.76441c0,-2.84546 1.7688,-5.3064 4.48609,-6.22925l13.125,-4.35791c0.56396,-0.20508 1.1023,-0.30762 1.64063,-0.35889zM117.68921,45.9375c3.76831,-0.33325 6.99829,2.48657 6.99829,6.5625v10.25391l-13.125,1.82007v-16.79077l4.48609,-1.48681c0.56396,-0.20508 1.1023,-0.30762 1.64063,-0.35889zM149.52759,72.49512l14.53491,5.22949v94.43848l-14.32984,4.7168l-103.79516,-14.53491v-75.31494zM124.6875,89.23462l-32.8125,4.61426v24.27612h32.8125zM85.3125,94.74609l-26.25,3.69141v19.6875h26.25zM59.0625,124.6875v19.6875l26.25,3.69141v-23.37891zM91.875,124.6875v24.27612l32.8125,4.61426v-28.89038z"/></g></g></g></svg>
Get apps in store
</p>
</div>
<!-- END WINDOWS STORE BOX -->
<!-- clearing div -->
<div id='styleRuleDiv' style='display:none;'></div>
<script src='static/js/sharebox.js'></script>
</body>
</html>
I'm not sure if I've misunderstood, but you because you are using fix and absolute they are excluded from the normal document flow.
So you can easily restrict the height of #servicesBox. to prevent it from touching the bottom.
See fiddle: https://jsfiddle.net/16sn87pa/

Align HTML items

I have one div containing 3 divs.
original
HTML code
.state {
background-color: rgba(233, 234, 237, 0.9);
height: 7vh;
width: 80%;
border-radius: 14px;
margin: 10px 0 15px 80px;
display: flex;
align-items: stretch;
}
.state-main {
text-align: center;
padding-top: 10px;
font-weight: 900;
font-size: 14px;
}
.options {
text-align: right;
margin-bottom: 10px;
}
.owner-image {
border-top-left-radius: 14px;
border-bottom-left-radius: 14px;
}
<div class="state">
<div class="owner">
<img class="owner-image" src="img/uk.jpg">
</div>
<div class="state-main">
<p class="state-name">PENNSYLVANIA</p>
</div>
<div class="options">
<p id="time"></p>
<button>SEND TROOPS</button>
<button>ATTACK</button>
</div>
</div>
Use flexbox (browser support).
.state {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 80px;
background-color: lightgray;
}
.state,
.btns button {
text-transform: uppercase;
}
<div class="state">
<img src="http://placehold.it/150x80/fc0">
<p>
Pennsylvania
</p>
<div class="btns">
<button>Send Troops</button>
<button>Attack</button>
</div>
</div>
**For IE9 and older you'll need to provide a fallback. Whether or not you need to do this depends on target audience.
.State is the div that contains all 3. .state-main is yellow div and should go at the center. .options is green div should go far right. .owner-image is the red div, and should stay at the same place.
Using flex to put the layout into place.
.state {
display: flex;
justify-content: space-between;
}
.state-mail {
text-align: center;
}
<div class="state">
<div class="owner-image">
<img src="http://placehold.it/100x50" />
</div>
<div class="state-main">PENNSYLVANIA</div>
<div class="options"><button>SEND TROOPS</button><button>ATTACK</button></div>
</div>

How to stop div from pushing other divs down?

I have some divs.
I am using a Grid system and I cannot for the life of me figure out how to stop divs from pushing others down.
When I try to set the margin top to say 50px for the border div it pushes everything else down.
I do not want to use position absolute due to being responsive grid system.
body {
font-size: 100%;
font-family: Lato;
}
img {
width: 100%;
height: auto;
max-height: 640px;
}
h2 {
font-size: 3.2em;
font-weight: 300;
text-align: center;
margin-top: 160px;
}
ul {
text-align: center;
margin-top: 100px;
overflow: hidden;
margin-right: 25px;
}
ul > li {
display: inline-block;
padding: 0 25px;
font-size: 1.1rem;
}
#circle {
font-size: 1.2rem;
border: 1px solid black;
border-radius: 5px 20px 5px;
padding: 0 20px;
}
.border {
overflow: hidden;
border: 2px solid black;
margin-top:;
}
<div class="cover">
<div class="grid">
</div>
<div class="row">
<div class="c12">
<div class="border"></div>
<div class="clear"></div>
<ul>
<li id="circle">H</li>
<li>Home</li>
<li id="circle">A</li>
<li>About</li>
<li id="circle">W</li>
<li>Work</li>
<li id="circle">C</li>
<li>Contact</li>
</ul>
</div>
</div>
<div class="row">
<div class="c12">
<h2>Exquisite Web Development</h2>
</div>
</div>
</div>
</div>
On the border div, you can remove the margin and add:
position: relative;
top: 50px;
Seems to me that the problematic margin is here:
ul {
margin-top: 100px;
}
Remove or shrink that and add your margin to .border as intended.
body {
font-size: 100%;
font-family: Lato;
}
img {
width: 100%;
height: auto;
max-height: 640px;
}
h2 {
font-size: 3.2em;
font-weight: 300;
text-align: center;
margin-top: 160px;
}
ul {
text-align: center;
overflow: hidden;
margin-right: 25px;
}
ul > li {
display: inline-block;
padding: 0 25px;
font-size: 1.1rem;
}
#circle {
font-size: 1.2rem;
border: 1px solid black;
border-radius: 5px 20px 5px;
padding: 0 20px;
}
.border {
overflow: hidden;
border: 2px solid black;
margin-top: 50px;
;
}
<div class="cover">
<div class="grid"></div>
<div class="row">
<div class="c12">
<div class="border"></div>
<div class="clear"></div>
<ul>
<li id="circle">H</li>
<li>Home</li>
<li id="circle">A</li>
<li>About</li>
<li id="circle">W</li>
<li>Work</li>
<li id="circle">C</li>
<li>Contact</li>
</ul>
</div>
</div>
<div class="row">
<div class="c12">
<h2>Exquisite Web Development</h2>
</div>
</div>
</div>
Try using:
position: relative;
top: 50px;
Here is a pen: http://codepen.io/anon/pen/GpyMKp
For your border div. This is a way to move an element from it's usual position without affecting the other divs.
Although I feel like you would be better off just reducing the margin-top on your ul element, and you could achieve the same layout without it being a sort of "hacky" solution.

I am Trying to make a header in css stretch full width across the browser

I am trying to make a header wider, so that it extends to both sides of the browser size. I have all of my content inside of a wrapper div that is set to 990px. My header is the part I want to be full width. I also am trying to make my header have a fixed position. But when i put the corrected position into the css for the header, the title and the navigation bar stack vertically and do not remain how I originally set them.
<body>
<div class="wrapper">
<header class="header">
<h1>Automotive Industries</h1>
<ul class="navbar">
<li id="contact" class="navlist">Contact</li>
<li class="navlist">Services</li>
<li class="navlist">About</li>
<li class="navlist">Home</li>
</ul>
</header>
<div class="main">
<p>Welcome to the #1 stop in automotive today</p>
<div class="article">
<img class="image" src="http://cdnedge.vinsolutions.com/dealerimages/Dealer%204697%20Images/content/car-tire-repair.jpg">
</div>
<div class="article">
<img class="image" src="http://www.lonniesautomachineshop.com/shopimg/Engines1.jpg">
</div>
<div class="article">
<img class="image" src="http://image.superstreetonline.com/f/features/modp-1011-castrol-syntec-top-car-challenge-nissan-gtr/29181584/eurp_1011_02_o+castrol_syntec_top_car_challenge+lift.jpg">
</div>
</div><!--end of main-->
<div class="main-two">
<p id="two-header">Schedule today for a free consultation</p>
<div class="article">
<img class="image" src="http://s3-media2.fl.yelpcdn.com/bphoto/YDLPwsEk_fMXIw9Xwu_8rw/ls.jpg">
</div>
<div class="article">
<img class="image" src="http://image.trucktrend.com/f/tech/1011tr_2004_gmc_sierra_buildup/28770854/1011tr_03+2004_GMC_sierra_buildup+factory_ring_and_pinion.jpg">
</div>
<div class="article">
<img class="image" src="http://aautomotivetx.com/wp-content/uploads/2013/04/Brakes.jpg">
</div>
</div><!--end of main-two-->
<div class="main-three">
<p id="two-header">Guranteed service for 30 days</p>
<div class="article">
<img class="image" src="http://bernalautobodyrepair.com/images/paint_booth.jpg">
</div>
<div class="article">
<img class="image" src="https://www.bkreader.com/wp-content/uploads/2015/06/welding-1.jpg">
</div>
<div class="article">
<img class="image" src="http://cdn.instructables.com/F4Q/QD4F/HHS9SLP0/F4QQD4FHHS9SLP0.LARGE.jpg">
</div>
</div><!--end of main-three-->
<footer class="footer">
<p class="copyright">Schedule now! Call today at (123)456-7890.</p>
<p class="copyright-two">Copyright © All Rights Reserved.</p>
<div class="social-icons">
<img src="http://www.voxlumiere.com/wp-content/uploads/2009/12/facebook-logo-resized-image-50x50.png"/>
<img src="http://www2.actionforchildren.org.uk/media/128162/twitter_50x50.jpg"/>
<img src="http://www.clickondetroit.com/image/view/-/21435108/highRes/1/-/ubsa5pz/-/50x50-Instagram-logo-png.png"/>
</div><!--end of social-icons-->
</footer>
</div><!--end of wrapper-->
* {
padding: 0;
margin: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-size: 62.5%;
font-family: arial, sans-serif;
color: black;
background-image: url("http://www.theonecar.com/wp-content/uploads/2014/02/car-shops-499.jpg"), url("http://i.ytimg.com/vi/1n5j3sy-Rok/maxresdefault.jpg");
background-repeat: no-repeat;
background-position: top, bottom;
}
.wrapper {
font-size: 1.6em;
margin: 0 auto;
width: 990px;
background-color: white;
/*padding: 2em;*/
}
header {
background-color: white;
height: 50px;
display: block;
width: 100%;
}
header h1 {
float: left;
padding: 5px;
color: rgb(95, 207, 128);
margin-top: 5px;
margin-left: 100px;
font-size: 1.8em;
}
.navlist a {
text-decoration: none;
color: black;
}
.navlist a:hover {
color: white;
background-color: rgb(95, 207, 128);
padding: 15px;
}
.navlist {
float: right;
display: inline-block;
text-align: center;
padding: 15px;
font-size: 1.2em;
}
.main {
min-height: 20px;
background-color: rgb(95, 207, 128);
display: block;
width: 100%;
}
.main p {
color: white;
font-size: 1.6em;
padding: 50px;
float: left;
width: 100%;
}
.article {
display: inline-block;
width: 33%;
padding: 63px;
}
.image {
min-width: 200px;
min-height: 200px;
max-width: 200px;
max-height: 200px;
}
.main-two {
background-color: #39ADD1;
display: block;
}
.main-two p {
color: white;
font-size: 1.6em;
padding: 50px;
text-align: right;
width: 100%;
}
.main-three {
min-height: 20px;
background-color: #f08c35;
display: block;
width: 100%;
}
.main-three p {
color: white;
font-size: 1.6em;
padding: 50px;
float: left;
width: 100%;
}
.article {
display: inline-block;
width: 33%;
padding: 63px;
}
.article {
display: inline-block;
width: 33%;
padding: 63px;
}
footer {
background-color: #294860;
}
.copyright {
text-align: center;
padding: 5px;
color: white;
font-size: 1.4em;
}
.copyright-two {
text-align: center;
padding: 5px;
color: white;
font-size: 1.4em;
}
.social-icons {
display: inline-block;
padding: 5px;
margin-left: 40.2%;
width: 100%;
}
.social-icons a {
margin-left: 5px;
header {
...
width: 100%;
min-width: 990px;
position: fixed;
left: 0;
}
Demo
You're seeing horizontal scrolling because the site loads in a frame. That shouldn't happen in a full browser window.
you header would need to be outside the wrapper since the wrapper is 990px wide.
make the header width 100% but it needs to either be on the root of the div structure or in another 100% width element.
Because it's inside you're <div class="wrapper"> It's not possible,
Move it above the wrapper and it should work.
<header class="header">
<h1>Automotive Industries</h1>
<ul class="navbar">
<li id="contact" class="navlist">Contact</li>
<li class="navlist">Services</li>
<li class="navlist">About</li>
<li class="navlist">Home</li>
</ul>
</header>
<div class="wrapper">