Hello,

Maybe this is very easy question if I know CSS but here goes.

As you see in the pic, I'd like to remove whitespace between sidebar blocks. I don't want to remove whitespace for all sidebar blocks.
I just want to remove whitespace and boarder for some sidebar blocks.

CommentFileSizeAuthor
whitespace.jpg25.43 KBekkljs

Comments

nevets’s picture

Each block has a unique id, you can use that to apply css that is particular to a block.

ekkljs’s picture

Okay. So here is CSS for general(?) blocks I think.

.block .content {
border: 1px solid #ddd;
padding: 0.5em;
position: relative;
}

so if I put some like following in style.css and put div class="block1" in block content would work?

.block1 .content {
border: 0px solid #ddd;
padding: 0em;
position: relative;
}

Sorry for my ignorance..

ekkljs’s picture

I made it in style.css and cleared the cache including themes but it didn't read following CSS.

.block-block-38 .content {
border: 0px solid #ddd;
padding: 0em;
position: relative;
}

Do I miss something?

ekkljs’s picture

After applying above CSS into custom.css, it started to work somewhat...

no border...

However I could still see whitespace between blocks. It seems like it is still under sidebar inner CSS in following(layout.css).

.sidebar .inner {
padding: 1em 1.25em;
}

Any solution?

nevets’s picture

.block-block-38 should probably be #block-block-38 (I am pretty sure 'block-block-38' is an id, not class).

ekkljs’s picture

yes, after putting following CSS into custom.css it works..

#block-block-38 {
border: 0;
font-size: 0;
margin-top: 0;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}
#block-block-38 .img{
border: 0;
font-size: 0;
margin-top: 0;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}

#block-block-38 .content{
font-size: 0;
margin-top: 0;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
border:0;
}

Thanks you!! One other question.. Not sure why but it only works in custom.css not style.css.

Do you know why?

nevets’s picture

When added to style.css it would need be be after any other css to applied in general to blocks.

ekkljs’s picture

Status: Active » Closed (fixed)

Thank you!

Eitisha’s picture

Thanks alot . It is really helpful