Position DIV with absolute position above DIV with fixed position

advertisements

Here's my problem: http://www.gncshop.com.ar/portal/company/

My client asked me to align the image slider to the top of the page. I made a black bar with position fixed, (you can see this bar at the very top of the page) and it is at the right place.

Now, What I need to do is align the imageslider right below it...

I can later set the bar with height: 0px and make it disappear, and just show the imageslider.

The imageslider cannot be position: fixed... it needs to scroll along with the page.

Thanks for any help!

.upperfixedbanner {
position:fixed;
top:0px;
width:100%;
height:10px;
background-color:#000000;
}

.upperfixedbanner > .sliderhomepage {
display:block;
  position: absolute;
width:100%;
top: 0px;
margin-top:0px;
left:0px;
}
<div class="upperfixedbanner">
</div>

<div class="sliderhomepage">
<!--SHORTCODE OF SLIDER-->
  </div>

MORE INFO: C

CMS: Wordpress Plugins: Meta Slider (for image slider) WP-Bakery Visual Composer (my client told me she would have to update the site very often.


I think you need to change the position and then introduce a top margin, I suggest trying:

.upperfixedbanner > .sliderhomepage {
display:block;
position: static;
width:100%;
top: 0px;
margin-top:10px;
left:0px;
}