I am having some real issues trying to add custom css for certain blocks. I know I have done this with the older 5.0 version and had no problems. I cannot seem to make any changes in the newest version.

The below code should change the login block.

#block-user-0 .blocktitle {
  color: #000000;
  background: #FFFFFF  url(images/user_login.jpg) left top no-repeat;
  width: 250px;
  font-size: 16px;
  font-variant: small-caps; 
  font-weight:bold;
  font-family: Verdana, sans-serif;
  border-right: 10px solid #FFC700;
  border-bottom: 2px solid #FFC700;
  height:36px;
  padding: 0px 0px 0px 40px;
  margin: 0px 0px 0px 0px;
  
}  

I have refreshed deleted my cache and still see no changes. Any ideas on what I am doing wrong?

Comments

nevets’s picture

A link to the site would really help other help in this case. It would also help if you spelled out what "not working" means. I would suggest using the firebug extension to firefox. By using the inspect feature you can easily see the html and css that is be used for the login block.

dvessel’s picture

Those classes are theme dependent and not on a particular version of core. You sure you have those classes inside your block.tpl.php?

pbarnett’s picture

Hi!

You've run two selectors together there :- .blocktitle instead of .block title

Firefox Web Developer plugin says that the relevant CSS is #block-user-0 .clear-block block block-user

In a modified version of Garland, I found that #block-user-0 h2 allowed me to change the login block title.

Pete.

pbarnett’s picture

duplicate post - sorry

llizards’s picture

I forgot to upload my custom block.tpl.php.. got it... Thanks

alegacy’s picture

Do you include your custom css in the block.tpl.php file?

pbarnett’s picture

I generally append it to the theme's style.css; that way I remember where I put it :-)

Pete.