Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I want to give the whole first sidebar one solid color to make it appear like one area of the website. I have added following code to my blocks.css but this only colors the blocks enclosed inside the sidebar:
#sidebar-first .block {
background: #EEEEEE;
float: left;
width: 232px;
}
What code do I Need to use to get it working? I also tried with the following code but still the blocks were colored, not the sidebar:
#sidebar-first{
background: #EEEEEE;
float: left;
width: 232px;
}
Thanks in advance!
Comments
Comment #1
shruti.sheth CreditAttribution: shruti.sheth commentedHi,
The code,
#sidebar-first{
background: #EEEEEE;
float: left;
width: 232px;
}
is getting applied to the first sidebar itself and not the block. You may be feeling so as you might have only one block enabled to this region.
Try enabling more than one block to this region and check. Also you can give specific height to the sidebar like
#sidebar-first{
height: 400px;
}
Hope this helps !
Thanks,
Shruti Sheth
Comment #2
BhumikaVarshney CreditAttribution: BhumikaVarshney as a volunteer and at OpenSense Labs commentedHi,
This code
#sidebar-first .block {
background: #EEEEEE;
float: left;
width: 232px;
}
is working and the background color is displayed if you add more than one block to the sidebar region, if there is only one block in the sidebar region no changes will be reflected.
Comment #3
gaurav.kapoor CreditAttribution: gaurav.kapoor commentedComment #4
gaurav.kapoor CreditAttribution: gaurav.kapoor commented