1

I guess what I wrote isn't getting across right, so I took another photo in hopes it clears some stuff up. https://imageshack.com/i/nsa47wp as you can see the content needs to live in those red lines, but the background on the left needs to stay white and the right needs to be a background img.

So, I guess its to hard to explain, I guess its best for me to just show you a img.

What I am trying to do is have a div with a 100% width and one side have white and the other side be a background img. Take a look at the image https://imageshack.com/i/3ogkqqp and please let me know if its possible.

Keep in mind the container is `width:1180px & margin:0px auto'

  <div class="event_box">
      <div class="img_con">
         <img src="<?php  echo get_field('img'); ?>" width="50" alt="">
      </div>
      <div class="content_con">
         <?php  echo get_field('text'); ?>
       </div> 
  </div>

.box_container
----------------------------------------------
   White Bg  |   
   .img_box  |  .content_con   BG IMG
             |
----------------------------------------------
  • 1
    Are you trying to make it responsive? And is there a reason you cannot do two divs inside of one div. So
    &bnsp;
    – isaac weathers Feb 23 '14 at 03:13
  • Not resposive. Its a tricky. not sure if this can be done. – user3341749 Feb 23 '14 at 03:17
  • Apply the white to `img_con` and the image background to `content_con`... – Zach Saucier Feb 23 '14 at 03:24
  • Try Zach's suggestion and then you may want to take a look here: http://stackoverflow.com/questions/3197250/position-a-css-background-image-x-pixels-from-the-right You should be able to use the background image position. If it is just a white background then you can just pick up the native browser white from the page background or make the containing div have a background of #ffffff; – isaac weathers Feb 23 '14 at 03:37
  • Are you looking for `.event_box { padding-left:50px; padding-right:50px; }`? – Zach Saucier Feb 23 '14 at 03:40
  • I got it and saved it on jsfiddle http://jsfiddle.net/tnnPD/ – user3341749 Feb 23 '14 at 03:46

0 Answers0