Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Set image full bleed outside of site padding


Question

Site URL: https://www.craftedfestival.com.au/

Hi guys, 

I've been doing some serious CSS hacking trying to get a wave graphic to sit over my banner images on the Brine Template.

I've managed to add the image to every page, however the site has 30px of padding site wide. To get the image to be full width, I've added a -30px margin to the left but then the banner stops short on the right as the width isn't long enough. To overcome this, I've tried making the wide 100% + 30px but for some reason this extends the graphic outside of the website container and makes a horizontal scroll bar for about 200px! So now I've got the width set to 103% which works on some screen sizes, but either goes past site boundary on extra large widths, and falls short on mobile. 

Any ideas on how to get the wave graphic to just fit perfectly at 100% of the page but not within the site padding boundary??

 

/*Add wave to banner images*/

#block-yui_3_17_2_1_1620107629754_2747{

  overflow: visible;

  &:before {

    content: '';

    width: calc (100% + 30px);

    height: 100px;

    background-image: url(https://static1.squarespace.com/static/58a18e6da5790a7c3fcaaf73/t/6090a1cb6f648c6378f7640d/1620091339242/Image-wave.png);

    position: absolute;

   margin-top: -100px;

    margin-left: -30px;

  }

}

Link to comment
  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...