- This topic is empty.
-
AuthorPosts
-
October 5, 2019 at 4:22 pm #296982VancouverMelParticipant
Hi everyone!
I’m new at coding and I’ve downloaded a free template that I’m changing up for a friend’s business. So far, so good, but I’ve got this big white space just below the header (logo/menu/team pic) and I can’t get rid of it! I’ve tried everything I could think of and I’m going a little nuts here. Please help!! It seemed to be behind the team picture at first (hero section) and would show on resize (background-size was set to contain – ie. the team picture). I’ve changed the background-size and made it so that the picture would stay right below the menu but I can’t get rid of the white space (now it’s all showing below and gets bigger on smaller screens). Is there a background to my background? And where is it coming from?
Here’s the link to the page: http://runmelanierun.com/g/index.html
Here are the sections of CSS code which I think relates to it, but if you need to see more, please let me know.
Thanks!
MelanieCSS:
Global Styles
========================================================================== /
a { color: #353535; -webkit-transition: all 0.5s; -moz-transition: all 0.5s; -o-transition: all 0.5s; transition: all 0.5s; }
a:hover, a:focus { color: #3dc9b3; text-decoration: none; }
p { color: #8c9398; word-spacing: 1px; line-height: 25px; font-size: 14px; }
h2 { font-size: 15px; color: #353535; text-transform: uppercase; font-weight: bold; }
h2::after { content: ” “; border: solid 2px #3dc9b3; display: block; width: 35px; margin: 25px auto; }
.section-padding { padding: 90px 0 100px }
.dark-bg { background: #f3f5f8; }
.light-bg { background-color: #fff; }
.dark-box { background: #f3f5f8; -webkit-box-shadow: 0px 3px 0px 0px #f0f2f4; -moz-box-shadow: 0px 3px 0px 0px #f0f2f4; box-shadow: 0px 3px 0px 0px #f0f2f4; }
.light-box { background-color: #fff; -webkit-box-shadow: 0px 3px 0px 0px #f0f2f4; -moz-box-shadow: 0px 3px 0px 0px #f0f2f4; box-shadow: 0px 3px 0px 0px #f0f2f4; padding: 20px 0; }
.light-box:hover, .light-box:focus { -webkit-box-shadow: 0px 3px 0px 0px #3dc9b3; -moz-box-shadow: 0px 3px 0px 0px #3dc9b3; box-shadow: 0px 3px 0px 0px #3dc9b3; }
.box-hover { transition: all 500ms ease-in-out; -webkit-transition: all 500ms ease-in-out; -moz-transition: all 500ms ease-in-out; -o-transition: all 500ms ease-in-out; }
.box-hover:hover, .box-hover:focus { transform: translate(0, -15px); -webkit-transform: translate(0, -15px); -ms-transform: translate(0, -15px); }
.wrapper { height: 650px; }
.nopadding { padding: 0; }
.inner { padding-top: 170px; }
/ ==========================================================================
Hero
========================================================================== /
.hero { background-image: url(“../img/hero-bg.jpg”); background-repeat: no-repeat; position: relative; -webkit-background-size: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size: 100%; width: 100vw; height: 100vh; }
.hero h1 { font-size: 40px; letter-spacing: 12px; margin: 10px; }
.hero h1 span { color: #a1a9b0; display: inline-block; }
.hero p { letter-spacing: 1px; }
.learn-more-btn { background: rgba(61, 201, 179, 1); padding: 20px 40px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -o-border-radius: 5px; color: #fff; text-transform: uppercase; letter-spacing: 1px; display: inline-block; -webkit-box-shadow: 0px 3px 0px 0px #309383; -moz-box-shadow: 0px 3px 0px 0px #309383; box-shadow: 0px 3px 0px 0px #309383; margin: 60px 0 0; font-weight: bold; }
.learn-more-btn:hover, .learn-more-btn:focus { background: rgba(61, 201, 179, 0.6); color: #fff; }
/ ==========================================================================
Intro
========================================================================== /
.intro { background: #f3f5f8; }
.intro p { margin: 50px 0 0; }
h1.arrow { font-size: 15px; text-transform: uppercase; color: #353535; letter-spacing: 1px; background: url(‘../img/h1-bg.png’) no-repeat center bottom; padding-bottom: 30px; font-weight: bold; }
/ ==========================================================================October 6, 2019 at 2:40 pm #296997vulkanusParticipantHi,
I think you have to define a height like 640px in .hero and play with media query to adjust the container, also removing .inner { /padding-top: 170px;/ }
.hero {
background-image: url(../img/hero-bg.jpg);
background-repeat: no-repeat;
position: relative;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
width: 100vw;
top: 0;
bottom: 0;
display: block;
overflow: hidden;
padding-bottom: 0%;
margin: 0 auto;
background-position: 50%;
margin: 0 auto;
max-height: 400px;
max-width: 1920px;
}and adjust with media query for the other screen sizes, sorry if didnĀ“t help.
October 7, 2019 at 1:30 pm #297037VancouverMelParticipantHi!
Thanks so much for your help! :) I really appreciate it.
The white space is gone and it looks great on the smaller sized window but my background picture’s height is cut when I make the browser window bigger. I guess that’s what you were saying when you mentioned to adjust with media queries… Can you give me an example on how I would do that?
Thanks!
Melanie -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.