At my site I have a logo on the first page, but it doesn’t come visible until I start scrolling? How to I make it visible right away?
Here is my html
<div id="introwrapper">
<div id="intro">
<!-- <div id="introbaggrundforan"></div>-->
<div id="introbaggrundbagved"></div>
<a name="section1" class="section1">SECTION 1</a>
</div> <!--#intro-->
<div id="logo"></div>
Here is my Css:
#introwrapper {
height: 900px;
position: relative;
overflow: hidden;
background: transparent url('images/introbagved.png') no-repeat center;
}
#intro{
background: url('images/introforan.png') no-repeat center;
height: 900px;
width: 1440px;
margin: 0;
position: relative;
z-index: 3;
}
#logo{
background: transparent url('images/logo.png') no-repeat center;
width: 400px;
height: 400px;
position: absolute;
margin-left: 520px;
margin-top: 160px;
z-index: 2;
}
Here is my Jquery:
$(document).ready(function(){
$(window).bind('scroll',function(e){
parallaxScroll();
});
function parallaxScroll(){
var scrolledY = $(window).scrollTop();
$('#logo').css('top','+'+((scrolledY*.819))+'px');
Add
to the
#logocss rule.The problem is that you have not defined a location for that element, so it is inserted in relation to the previous elements.. and that is after the
#introdiv.