Hi,

I am trying to customize three Blocks created in Views in order to have a layout of two blocks at 50% width so they appear next to each other + another block under them with a width of 100%. The three blocks are in content-top.

Here's my the fragment of CSS that doesn't want to work. The website is here: http://yananas.com/dp/

#block-block-views-homepage_block-block_1 {width: 50%;
float: left;
}
#block-block-views-homepage_block-block_3 {width: 50%;
float: left;
}
#block-block-views-homepage_block-block_2 {width: 100%;
float: left;

(note that the blocks that are next to each other are 1 and 3)

Thanks!

Comments

bmx269’s picture

First thing, I do not see the css above on the blocks. Did you upload the file? Empty the cache?

-Trent

Anonymous’s picture

Yes and Yes,
Is fragmenting blocks in css the way to do such layout? I'm not sure about the ID's too..

bmx269’s picture

Your css id's are wrong.

#block-views-homepage_block-block_1{
float:left;
width:50%;
}

#block-views-homepage_block-block_3{
float:left;
width:50%;
}

#block-views-homepage_block-block_2{
float:left;
width:100%;
}

-Trent

Anonymous’s picture

So it was the ID's after all ! Thanks a lot for your time, it worked, i've been trying to figure it out the whole last day.

bmx269’s picture

No problem. There is usually a simple answer to most problems, it just takes a second opinion, or a step back and pause, to realize it.

vj’s picture

#block-views-homepage_block-block_1 {
   width: 50%;
   float: left;
}

#block-views-homepage_block-block_3 {
    width: 50%;
    float: right; 
}

#block-views-homepage_block-block_2 {
   width: 100%;
   float: left; 
}
Anonymous’s picture

Just right, thanks a lot!