Bootstrap full-width with 2 different backgrounds (and 2 columns) The Next CEO of Stack OverflowGet Two Columns with different background colours that extend to screen edgeMake containers respect grid but fill remaining spaceFull-width split row with a fixed-width content area?the same background on the one side of containerFull-width CSS offset columnsMake background image wider than the container but only on one sideHow to Keep Content in a Container, but Extends Background Images Full Width?Centered content but main content and sidebar have there own colors that expanse the screenCSS - how to overflow from div to full width of screenOverflow image outside container on left sideHow do I give text or an image a transparent background using CSS?What's the difference between SCSS and Sass?How to make Twitter Bootstrap menu dropdown on hover rather than clickBootstrap modal appearing under backgroundBootstrap - Text-align class for inside tableCenter a column using Twitter Bootstrap 3How can I make Bootstrap columns all the same height?What is sr-only in Bootstrap 3?vertical-align with Bootstrap 3Bootstrap 4 Full width background on table header and rows but container on contents

Why Were Madagascar and New Zealand Discovered So Late?

Grabbing quick drinks

How to count occurrences of text in a file?

What is the purpose of the Evocation wizard's Potent Cantrip feature?

Return of the Riley Riddles in Reverse

Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?

Is it a good idea to use COLUMN AS (left([Another_Column],(4)) instead of LEFT in the select?

Anatomically Correct Strange Women In Ponds Distributing Swords

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Where to find order of arguments for default functions

How to safely derail a train during transit?

How to Reset Passwords on Multiple Websites Easily?

Unreliable Magic - Is it worth it?

Why doesn't a table tennis ball float on the surface? How do we calculate buoyancy here?

Why here is plural "We went to the movies last night."

How long to clear the 'suck zone' of a turbofan after start is initiated?

Explicit solution of a Hamiltonian system

Why is there a PLL in CPU?

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

How should I support this large drywall patch?

How do spells that require an ability check vs. the caster's spell save DC work?

Is a stroke of luck acceptable after a series of unfavorable events?

Term for the "extreme-extension" version of a straw man fallacy?

Was a professor correct to chastise me for writing "Prof. X" rather than "Professor X"?



Bootstrap full-width with 2 different backgrounds (and 2 columns)



The Next CEO of Stack OverflowGet Two Columns with different background colours that extend to screen edgeMake containers respect grid but fill remaining spaceFull-width split row with a fixed-width content area?the same background on the one side of containerFull-width CSS offset columnsMake background image wider than the container but only on one sideHow to Keep Content in a Container, but Extends Background Images Full Width?Centered content but main content and sidebar have there own colors that expanse the screenCSS - how to overflow from div to full width of screenOverflow image outside container on left sideHow do I give text or an image a transparent background using CSS?What's the difference between SCSS and Sass?How to make Twitter Bootstrap menu dropdown on hover rather than clickBootstrap modal appearing under backgroundBootstrap - Text-align class for inside tableCenter a column using Twitter Bootstrap 3How can I make Bootstrap columns all the same height?What is sr-only in Bootstrap 3?vertical-align with Bootstrap 3Bootstrap 4 Full width background on table header and rows but container on contents










4















It's a little bit hard to explain, that's why i also can't find the answer on Google.



I'm working with Bootstrap 3, and i need a full width background image. On top of that 2 transparent color backgrounds. I made a example image to make it all clear:





1+2: combined transparent color background



3+4: combined transparent color background



1+2+3+4: combined background image (lowest layer)



Does anyone know if this is possible and how? Thanks for your help!










share|improve this question



















  • 1





    This technique may give you some tips - stackoverflow.com/questions/28565976/…

    – Paulie_D
    Nov 6 '15 at 10:15















4















It's a little bit hard to explain, that's why i also can't find the answer on Google.



I'm working with Bootstrap 3, and i need a full width background image. On top of that 2 transparent color backgrounds. I made a example image to make it all clear:





1+2: combined transparent color background



3+4: combined transparent color background



1+2+3+4: combined background image (lowest layer)



Does anyone know if this is possible and how? Thanks for your help!










share|improve this question



















  • 1





    This technique may give you some tips - stackoverflow.com/questions/28565976/…

    – Paulie_D
    Nov 6 '15 at 10:15













4












4








4


2






It's a little bit hard to explain, that's why i also can't find the answer on Google.



I'm working with Bootstrap 3, and i need a full width background image. On top of that 2 transparent color backgrounds. I made a example image to make it all clear:





1+2: combined transparent color background



3+4: combined transparent color background



1+2+3+4: combined background image (lowest layer)



Does anyone know if this is possible and how? Thanks for your help!










share|improve this question
















It's a little bit hard to explain, that's why i also can't find the answer on Google.



I'm working with Bootstrap 3, and i need a full width background image. On top of that 2 transparent color backgrounds. I made a example image to make it all clear:





1+2: combined transparent color background



3+4: combined transparent color background



1+2+3+4: combined background image (lowest layer)



Does anyone know if this is possible and how? Thanks for your help!







html css twitter-bootstrap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 6 '15 at 10:48









Manoj Kumar

19.2k83869




19.2k83869










asked Nov 6 '15 at 10:02









zrerozrero

6617




6617







  • 1





    This technique may give you some tips - stackoverflow.com/questions/28565976/…

    – Paulie_D
    Nov 6 '15 at 10:15












  • 1





    This technique may give you some tips - stackoverflow.com/questions/28565976/…

    – Paulie_D
    Nov 6 '15 at 10:15







1




1





This technique may give you some tips - stackoverflow.com/questions/28565976/…

– Paulie_D
Nov 6 '15 at 10:15





This technique may give you some tips - stackoverflow.com/questions/28565976/…

– Paulie_D
Nov 6 '15 at 10:15












2 Answers
2






active

oldest

votes


















2














Yes, using the techniques outlined in this question but extending it to the columns.



The Codepen Demo (below) shows the result better than the Stack Snippet which is included for reference.






* 
margin: 0;
padding: 0;
box-sizing: border-box;

body
overflow: hidden;
/* prevent scrollbar */

.container
width:80%;
margin:auto;
margin-top: 1em;

position: relative;
overflow: visible;

.extra:before
content: '';
display: block;
/* override bootstrap */
position: absolute;
top: 0;
left: 50%;
width: 100vw;
height: 100%;
transform: translate(-50%, 0);

[class*="col"]
border: 2px solid grey;
min-height: 320px;
position: relative;

.left:before
content: '';
position: absolute;
height: 100%;
width: 100vw;
top: 0;
right: 0;
background: rgba(255, 0, 0, 0.5)

.right:before
content: '';
position: absolute;
height: 100%;
width: 100vw;
top: 0;
left: 0;
background: rgba(0, 0, 255, 0.25);

<div class="container extra">
<div class="row">
<div class="col-sm-4 left"></div>
<div class="col-sm-8 right"></div>
</div>
</div>





Codepen Demo






share|improve this answer
































    1














    I think i figured it out.. Thanks to Paulie_D



    Very simple example:



    HTML:



    <div class="fullwidth">
    <div class="cell red20">xxx</div>
    <div class="container cell">
    <div class="row">
    <div class="col-sm-4 red20">xx</div>
    <div class="col-sm-8 red50">xx</div>
    </div>
    </div>
    <div class="cell red50">xxx</div>
    </div>


    CSS:



    .fullwidth 
    background: url('http://www.ustudy.eu/nl/wp-content/uploads/2013/10/Test-taking-from-Flickr.jpg');
    display:table;
    width:100%;

    .cell
    display:table-cell;
    vertical-align:top;


    .red20
    background-color:rgba(255,0,0,0.2);


    .red50
    background-color:rgba(255,0,0,0.5);



    Link to jsfiddle: https://jsfiddle.net/DTcHh/14045/






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33564131%2fbootstrap-full-width-with-2-different-backgrounds-and-2-columns%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      Yes, using the techniques outlined in this question but extending it to the columns.



      The Codepen Demo (below) shows the result better than the Stack Snippet which is included for reference.






      * 
      margin: 0;
      padding: 0;
      box-sizing: border-box;

      body
      overflow: hidden;
      /* prevent scrollbar */

      .container
      width:80%;
      margin:auto;
      margin-top: 1em;

      position: relative;
      overflow: visible;

      .extra:before
      content: '';
      display: block;
      /* override bootstrap */
      position: absolute;
      top: 0;
      left: 50%;
      width: 100vw;
      height: 100%;
      transform: translate(-50%, 0);

      [class*="col"]
      border: 2px solid grey;
      min-height: 320px;
      position: relative;

      .left:before
      content: '';
      position: absolute;
      height: 100%;
      width: 100vw;
      top: 0;
      right: 0;
      background: rgba(255, 0, 0, 0.5)

      .right:before
      content: '';
      position: absolute;
      height: 100%;
      width: 100vw;
      top: 0;
      left: 0;
      background: rgba(0, 0, 255, 0.25);

      <div class="container extra">
      <div class="row">
      <div class="col-sm-4 left"></div>
      <div class="col-sm-8 right"></div>
      </div>
      </div>





      Codepen Demo






      share|improve this answer





























        2














        Yes, using the techniques outlined in this question but extending it to the columns.



        The Codepen Demo (below) shows the result better than the Stack Snippet which is included for reference.






        * 
        margin: 0;
        padding: 0;
        box-sizing: border-box;

        body
        overflow: hidden;
        /* prevent scrollbar */

        .container
        width:80%;
        margin:auto;
        margin-top: 1em;

        position: relative;
        overflow: visible;

        .extra:before
        content: '';
        display: block;
        /* override bootstrap */
        position: absolute;
        top: 0;
        left: 50%;
        width: 100vw;
        height: 100%;
        transform: translate(-50%, 0);

        [class*="col"]
        border: 2px solid grey;
        min-height: 320px;
        position: relative;

        .left:before
        content: '';
        position: absolute;
        height: 100%;
        width: 100vw;
        top: 0;
        right: 0;
        background: rgba(255, 0, 0, 0.5)

        .right:before
        content: '';
        position: absolute;
        height: 100%;
        width: 100vw;
        top: 0;
        left: 0;
        background: rgba(0, 0, 255, 0.25);

        <div class="container extra">
        <div class="row">
        <div class="col-sm-4 left"></div>
        <div class="col-sm-8 right"></div>
        </div>
        </div>





        Codepen Demo






        share|improve this answer



























          2












          2








          2







          Yes, using the techniques outlined in this question but extending it to the columns.



          The Codepen Demo (below) shows the result better than the Stack Snippet which is included for reference.






          * 
          margin: 0;
          padding: 0;
          box-sizing: border-box;

          body
          overflow: hidden;
          /* prevent scrollbar */

          .container
          width:80%;
          margin:auto;
          margin-top: 1em;

          position: relative;
          overflow: visible;

          .extra:before
          content: '';
          display: block;
          /* override bootstrap */
          position: absolute;
          top: 0;
          left: 50%;
          width: 100vw;
          height: 100%;
          transform: translate(-50%, 0);

          [class*="col"]
          border: 2px solid grey;
          min-height: 320px;
          position: relative;

          .left:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          right: 0;
          background: rgba(255, 0, 0, 0.5)

          .right:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          left: 0;
          background: rgba(0, 0, 255, 0.25);

          <div class="container extra">
          <div class="row">
          <div class="col-sm-4 left"></div>
          <div class="col-sm-8 right"></div>
          </div>
          </div>





          Codepen Demo






          share|improve this answer















          Yes, using the techniques outlined in this question but extending it to the columns.



          The Codepen Demo (below) shows the result better than the Stack Snippet which is included for reference.






          * 
          margin: 0;
          padding: 0;
          box-sizing: border-box;

          body
          overflow: hidden;
          /* prevent scrollbar */

          .container
          width:80%;
          margin:auto;
          margin-top: 1em;

          position: relative;
          overflow: visible;

          .extra:before
          content: '';
          display: block;
          /* override bootstrap */
          position: absolute;
          top: 0;
          left: 50%;
          width: 100vw;
          height: 100%;
          transform: translate(-50%, 0);

          [class*="col"]
          border: 2px solid grey;
          min-height: 320px;
          position: relative;

          .left:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          right: 0;
          background: rgba(255, 0, 0, 0.5)

          .right:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          left: 0;
          background: rgba(0, 0, 255, 0.25);

          <div class="container extra">
          <div class="row">
          <div class="col-sm-4 left"></div>
          <div class="col-sm-8 right"></div>
          </div>
          </div>





          Codepen Demo






          * 
          margin: 0;
          padding: 0;
          box-sizing: border-box;

          body
          overflow: hidden;
          /* prevent scrollbar */

          .container
          width:80%;
          margin:auto;
          margin-top: 1em;

          position: relative;
          overflow: visible;

          .extra:before
          content: '';
          display: block;
          /* override bootstrap */
          position: absolute;
          top: 0;
          left: 50%;
          width: 100vw;
          height: 100%;
          transform: translate(-50%, 0);

          [class*="col"]
          border: 2px solid grey;
          min-height: 320px;
          position: relative;

          .left:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          right: 0;
          background: rgba(255, 0, 0, 0.5)

          .right:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          left: 0;
          background: rgba(0, 0, 255, 0.25);

          <div class="container extra">
          <div class="row">
          <div class="col-sm-4 left"></div>
          <div class="col-sm-8 right"></div>
          </div>
          </div>





          * 
          margin: 0;
          padding: 0;
          box-sizing: border-box;

          body
          overflow: hidden;
          /* prevent scrollbar */

          .container
          width:80%;
          margin:auto;
          margin-top: 1em;

          position: relative;
          overflow: visible;

          .extra:before
          content: '';
          display: block;
          /* override bootstrap */
          position: absolute;
          top: 0;
          left: 50%;
          width: 100vw;
          height: 100%;
          transform: translate(-50%, 0);

          [class*="col"]
          border: 2px solid grey;
          min-height: 320px;
          position: relative;

          .left:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          right: 0;
          background: rgba(255, 0, 0, 0.5)

          .right:before
          content: '';
          position: absolute;
          height: 100%;
          width: 100vw;
          top: 0;
          left: 0;
          background: rgba(0, 0, 255, 0.25);

          <div class="container extra">
          <div class="row">
          <div class="col-sm-4 left"></div>
          <div class="col-sm-8 right"></div>
          </div>
          </div>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 29 '18 at 13:29

























          answered Nov 6 '15 at 10:37









          Paulie_DPaulie_D

          75.6k96790




          75.6k96790























              1














              I think i figured it out.. Thanks to Paulie_D



              Very simple example:



              HTML:



              <div class="fullwidth">
              <div class="cell red20">xxx</div>
              <div class="container cell">
              <div class="row">
              <div class="col-sm-4 red20">xx</div>
              <div class="col-sm-8 red50">xx</div>
              </div>
              </div>
              <div class="cell red50">xxx</div>
              </div>


              CSS:



              .fullwidth 
              background: url('http://www.ustudy.eu/nl/wp-content/uploads/2013/10/Test-taking-from-Flickr.jpg');
              display:table;
              width:100%;

              .cell
              display:table-cell;
              vertical-align:top;


              .red20
              background-color:rgba(255,0,0,0.2);


              .red50
              background-color:rgba(255,0,0,0.5);



              Link to jsfiddle: https://jsfiddle.net/DTcHh/14045/






              share|improve this answer



























                1














                I think i figured it out.. Thanks to Paulie_D



                Very simple example:



                HTML:



                <div class="fullwidth">
                <div class="cell red20">xxx</div>
                <div class="container cell">
                <div class="row">
                <div class="col-sm-4 red20">xx</div>
                <div class="col-sm-8 red50">xx</div>
                </div>
                </div>
                <div class="cell red50">xxx</div>
                </div>


                CSS:



                .fullwidth 
                background: url('http://www.ustudy.eu/nl/wp-content/uploads/2013/10/Test-taking-from-Flickr.jpg');
                display:table;
                width:100%;

                .cell
                display:table-cell;
                vertical-align:top;


                .red20
                background-color:rgba(255,0,0,0.2);


                .red50
                background-color:rgba(255,0,0,0.5);



                Link to jsfiddle: https://jsfiddle.net/DTcHh/14045/






                share|improve this answer

























                  1












                  1








                  1







                  I think i figured it out.. Thanks to Paulie_D



                  Very simple example:



                  HTML:



                  <div class="fullwidth">
                  <div class="cell red20">xxx</div>
                  <div class="container cell">
                  <div class="row">
                  <div class="col-sm-4 red20">xx</div>
                  <div class="col-sm-8 red50">xx</div>
                  </div>
                  </div>
                  <div class="cell red50">xxx</div>
                  </div>


                  CSS:



                  .fullwidth 
                  background: url('http://www.ustudy.eu/nl/wp-content/uploads/2013/10/Test-taking-from-Flickr.jpg');
                  display:table;
                  width:100%;

                  .cell
                  display:table-cell;
                  vertical-align:top;


                  .red20
                  background-color:rgba(255,0,0,0.2);


                  .red50
                  background-color:rgba(255,0,0,0.5);



                  Link to jsfiddle: https://jsfiddle.net/DTcHh/14045/






                  share|improve this answer













                  I think i figured it out.. Thanks to Paulie_D



                  Very simple example:



                  HTML:



                  <div class="fullwidth">
                  <div class="cell red20">xxx</div>
                  <div class="container cell">
                  <div class="row">
                  <div class="col-sm-4 red20">xx</div>
                  <div class="col-sm-8 red50">xx</div>
                  </div>
                  </div>
                  <div class="cell red50">xxx</div>
                  </div>


                  CSS:



                  .fullwidth 
                  background: url('http://www.ustudy.eu/nl/wp-content/uploads/2013/10/Test-taking-from-Flickr.jpg');
                  display:table;
                  width:100%;

                  .cell
                  display:table-cell;
                  vertical-align:top;


                  .red20
                  background-color:rgba(255,0,0,0.2);


                  .red50
                  background-color:rgba(255,0,0,0.5);



                  Link to jsfiddle: https://jsfiddle.net/DTcHh/14045/







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 6 '15 at 10:35









                  zrerozrero

                  6617




                  6617



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid …


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33564131%2fbootstrap-full-width-with-2-different-backgrounds-and-2-columns%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

                      Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices

                      How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page