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.
| Comment | File | Size | Author |
|---|---|---|---|
| whitespace.jpg | 25.43 KB | ekkljs |
Comments
Comment #1
nevets commentedEach block has a unique id, you can use that to apply css that is particular to a block.
Comment #2
ekkljs commentedOkay. 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..
Comment #3
ekkljs commentedI 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?
Comment #4
ekkljs commentedAfter 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?
Comment #5
nevets commented.block-block-38should probably be#block-block-38(I am pretty sure 'block-block-38' is an id, not class).Comment #6
ekkljs commentedyes, 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?
Comment #7
nevets commentedWhen added to style.css it would need be be after any other css to applied in general to blocks.
Comment #8
ekkljs commentedThank you!
Comment #9
Eitisha commentedThanks alot . It is really helpful