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.
I've changed the sidebar width in "template.php" and "layout.css" so it's wider. However, the block width remains the same and I've looked through every file in .../amadou can't find a way to adjust the block width to fit the sidebar width.
For example, sidebar width is about 400px and text in block uses only about 1/3 of 400px. How do I change the block width so it's the same size as the sidebar width?
Thanks.
Comments
Comment #1
prokopton CreditAttribution: prokopton commentedComment #2
prokopton CreditAttribution: prokopton commentedAfter reading the forum and playing around with it, there's more than one way to do it. Here's what worked for me.
Make sure to disable all cache and clear cache. Admin -> Performance --> check "Disable" on all options --> save configuration.
Then "Clear Cache".
Restart apache if you have to: sudo /etc/init.d/apache2 restart (on Linux)
Otherwise, you won't see changes take effect.
1. "layout.css" :
#rightSidebar
{
width: 180px; --> increase to higher number. I changed it to 330px;
}
2. "template.php":
function amadou_get_mainContent_width($sidebar_left, $sidebar_right) {
$width = 530; ---> DECREASE TO SAME NUMBER AS INCREASED IN STEP 1 (330-180 = 150, IN MY CASE).
if (!$sidebar_left) {
$width = $width + 180;
}
...
function amadou_get_sideBars_width($sidebar_left, $sidebar_right) {
$width = 415; ---> INCREASE TO SAME NUMBER AS DECREASED IN ABOVE (get_mainContent)
if (!$sidebar_left) {
$width = $width - 205;
}
Admin --> Peformance . Put cache options back to preferred settings after done.