Obviously, I am doing something wrong here. I am trying to remove all padding, etcetera, around my header block only in a modification of BlueMarine. After determining the div id to be 9, I inserted the following after the other block styles in my css file.
#block-block-9 {
padding: 0 0 0 0;
border-bottom: 0;
padding-bottom: 0;
margin-bottom: 0;
margin-bottom: 0;
}
This works partially--it gets rid of the line at the bottom of the block--but I still have padding at the top and bottom. Examples are below. Please look at the top graphic on each example to see what I mean.
It looks like this: http://www.bluecrashkit.com/cheese/forums/general/blue_crash_kit_chatter
and I want it to looks like this (graphic pasted in directly): http://www.bluecrashkit.com/cheese/node
Comments
Some "extra" html and a few changes to the css
First looking at the html for the block
You have some elements that are causing some of the space, some you should be able to take out by editing the block, some you will need to use css. The extra elements are the h2, the paragraph tags (p) and break (br). You should be able to remove the break and at least one of the paragraph tags.
The following css will then remove the rest of the spaces. I left the background-color rules in there as a pointer (you can remove them). By setting the background color of various elements you can visually see where the space is. There may be extra rules that are not needed. I just put in margin/padding statements till the extra space was gone. The display: none; for the h2 tag completely removes it from the browser.
Thank you! :-)
That definitely got me on the right track. I ended up not altering my block.tpl.php file to take out the "extra" html because I wanted to leave all my other blocks the same, so I took your css and made a couple of modifications.
#block-block-9 {
padding: 0 0 0 0;
border-bottom: 0;
margin-top: 0;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}
#block-block-9 .content {
margin-top: 0;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}
#block-block-9 .content p{
font-size: 0;
margin-top: 0;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}
#block-block-9 .title{
font-size: 0;
margin-top: 0;
padding-top: 0;
margin-bottom: 0;
padding-bottom: 0;
}
Again, thank you so much for the help. I feel like a dork for not seeing this sooner.
Rob Hamm
http://www.bluecrashkit.com
http://www.bookmuncher.com
If, at some point in the
If, at some point in the future you change the location, or order that blocks appear in - Will they still keep the same id? i.e block-block-9 or will the id change if the number of, order of, or location of blocks are changed?
Is this really the best way to style individual blocks, or should I build blocks with specific
As far as I know the block id
As far as I know the block id stays the same even if you delete custom blocks. There are modules that let you add custom classes to each block.