I want to do something similar to what is shown on this drupal site:
http://intranet-demo.drupalminds.com/

Notice the red borders around all the blocks. I am using the denver theme, and would like to do the same thing. I know next to nothing about css. Is there an easy solution to this?

Thanks
Kevin

Comments

kendre_paresh’s picture

You can go in "block.tpl.php", and give "red" border in it.
Please take a trial, and write me.

boulwarek’s picture

Well I do have some html experience, and think I may have found out how to do it.
I put the whole thing in a table and defined the table border. Is this the correct way to do it?
Thanks
Kevin

boulwarek’s picture

Sorry for such simple questions. I did figure out a better way to do it. I will post for future reference.

In block.tpl.php:

Change

<div class="content"><?php print $block->content; ?></div>

To

<div class="content" style="border-style:solid; border-color:black; border-width:1px; margin-top:2px"><?php print $block->content; ?></div>
boulwarek’s picture

So where would I go to edit the style of blocks that I made with the views module? I created a view and made it a block, but when displayed it has a blue background which is not what I have setup in my block.tpl.php

joachim’s picture

You're best off making changes to your theme's stylesheet rather than block code. You can make changes to any or all blocks there.

diabloview’s picture

I put borders around my blocks by adding the border in the style.css stylesheet for my theme.
Look for .block in the style sheet and put your border code in there. I only used borders in my left sidebar blocks so I narrowed it down to putting the border on my .block style as follows:

#sidebar-left .block {
border: 1px solid #BDBFC1;
}

This is better than using inline styles. Hope that helps you. If you use firefox, download the add-on firebug and you can go down through your code and see what styles are applied to what, it also gives you the line number and what stylesheet your element is in and allows you to make changes in the right panel to see what will happen if you change something, then if it does what you want, you make the changes in your stylesheet to match.

boulwarek’s picture

Thanks a ton for this. The firebug extension helps me out so much. This got me going on the right track.

diabloview’s picture

it's definitely an indispensable tool when you're trying to change the css on a site, saves me tons of time.
Glad it helped you.