Negative margin for featured image

  • In Progress
    Posted in: Highend WP Theme  
  • Customer
    czucker
    September 9, 2014 at 7:00 pm #10773

    I would like to have my featured image be under the navbar, which has a gradient fade to transparent.

    I got this working by additional the following custom css:

    
    /* Set header transparency and remove border */
    #header-inner-bg {
    	background: rgba(0,0,0,1);
    	background: -moz-linear-gradient(top,rgba(0,0,0,1) 0%,rgba(255,255,255,0) 100%);
    	background: -webkit-gradient(left top,left bottom,color-stop(0%,rgba(0,0,0,1)),color-stop(100%,rgba(255,255,255,0)));
    	background: -webkit-linear-gradient(top,rgba(0,0,0,1) 0%,rgba(255,255,255,0) 100%);
    	background: -o-linear-gradient(top,rgba(0,0,0,1) 0%,rgba(255,255,255,0) 100%);
    	background: -ms-linear-gradient(top,rgba(0,0,0,1) 0%,rgba(255,255,255,0) 100%);
    	background: linear-gradient(to bottom,rgba(0,0,0,1) 0%,rgba(255,255,255,0) 100%);
    	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000',endColorstr='#ffffff',GradientType=0);
    	border-style: none !important;
    }
    
    #header-inner {
    	border-style: none !important;
    }
    
    /* Move featured section under nav bar */
    #slider-section {
    	margin-top: -130px;
    }

    It works well, see here:
    http://dev.genco.tv/home-carousel-3/

    Unfortunately, it also affects pages that don’t have a featured section. See here:
    http://dev.genco.tv/?s=oil

    I don’t see a way to add an additional class to the featured section so I’m not sure how I can only target specific pages with a negative margin on the featured section.

    Any help would be great.

    Thanks,
    Chris

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.