With Views, i've created some blocks. The blocks show on the frontpage the latest news, latest additions etc. But every time i add an extra block, i've to change the style.css. I have to add something like "#block-views-$blockname_1" and then some variables.
Can this quicker and (more important) permanently? By adding a rule that will change every block-vies in the future? I don't want to edit the css of the view-module, because the site is hosted in a multi-site environment. Therefore, changes has to be done in the folder of the individual site.
Comments
Comment #1
jswaby commentedThere should be a class name that is common among all of the blocks coming from views. Target the common block class name instead of the ID name.
If the ID is #block-views-_____, then the class will be something like .block-views-_____.
Let me know if that works.
Comment #2
MatthijsG commentedAnd thats exactly what i'm looking for: a common class name for all blocks coming from views :-D I don't know the name, otherwise i didn't asked.
Comment #3
jswaby commentedViews has to have a common class name for all of its blocks. Use fire bug to inspect the blocks and find it's common class name.
Based on the code in CVS, a class element is printed in the block called
the $block->module; would translate into "views". So my guess is that common class name you are looking for is ".block-views".
If that doesn't work, you can always create a tpl.php file that only works for the blocks from the views module. Not sure if it's done the same way for drupal 6 as it was for drupal 5.
Hope that helps.
Comment #4
jswaby commented