0

thanks guys. its solved. dont answer.

jsfiddle.net/GMLGn/5/

I still dont understand how it worked thought...

no matter how much I try, the black border div does not float to right and get inside the red one (besides the green one that is to left side).

In short I want the green and black look side by side jsfiddle.net/GMLGn/ any ideas?

The code is too long to post here (stack chars limit) and its not feasible to give partial code in current scenario.

kevin
  • 328
  • 4
  • 15
  • 33

3 Answers3

0

The green border is around #frontpage-image but the .gallery block is not inside that. So it makes sense that the other block won't be put into it.

Lasar
  • 5,175
  • 4
  • 24
  • 22
  • No... – kevin Jan 03 '13 at 14:07
  • Are you trying to put the black one inside the green one? – Pete Jan 03 '13 at 14:09
  • No. trying to put them side by side – kevin Jan 03 '13 at 14:10
  • Ok if you are floating the green one left and the black one right - the width (plus side padding and side margin) of the two added together cannot be more than the containing div so in your case as your black div is 290px (width) + 35px (padding) + 8 - 10px (border), this means your green div must total no more than 765px as your container is 1000px – Pete Jan 03 '13 at 14:16
  • `#frontpage-image` needs a `float: left` or it's not going to be floated obviously. And then see what Pete said; there's not enough room for both items like this. – Lasar Jan 03 '13 at 14:21
0

Try this:

.w1{
    margin:0 auto;
    width:1000px;
    padding:0 0 274px;
    /*NEW*/
    position:relative;
}
.gallery{
    width: 290px;
    min-height: 410px;
    padding: 20px 16px 6px 29px;
    line-height: 17px;
    color: #454444;
    background: url(../images/bg-gallery.png) no-repeat;
    border: thick solid rgb(0,0,0);
    /*NEW*/
    position:absolute;
    top:165px;
    right:0;   
}

Test: http://jsfiddle.net/GMLGn/4/

karacas
  • 2,054
  • 1
  • 19
  • 29
0

Use this css in #frontpage-image.

float: left;
width: 64%;
Selvamani
  • 7,434
  • 4
  • 32
  • 43