Overriding CSS in a block

Permalink 2 users found helpful
I have the following in my css for my sidebar:
#page #central #sidebar{ font-size:16px;padding-left:30px; padding-top:10px; font-style:oblique; float:right; width:23%; overflow:hidden ; background-image:url(images/sidebar.png) ;background-repeat:repeat-y; min-height:500px;}
#page #central #sidebar a:hover { background: url(images/star-black.png) no-repeat scroll 0 4px transparent; padding-left:14px;      /* customize_link_hover */ color: #000; /* customize_link_hover */

This allows for a "star" to appear next to any links in the sidebar.

I want to override this for one of the sections within the sidebar. I have tried to add the following in my css:

nostar {background:none;}
nostar.a {background:none;}
Then when in edit mode, in the section I do not want the stars to appear, I went into design > css and I tried for both the css id and css class names nostar - I tried them for both and one at a time. Neither worked.
I then put the following in the Additional CSS area:
background: none !important;

no change.

I have no idea what I am doing wrong

Any help would be greatly appreciated.

View Replies: View Best Answer
Pritam replied on at Permalink Reply
If you are using the Page List block for the links in the sidebar then you could create two separate custom templates one where the star icon is called and one without the star icon. You can read about creating custom templates herehttp://www.concrete5.org/documentation/general-topics/custom-templa... Also, here's a tutorial

globalnerds replied on at Permalink Reply
I read about custom templates, created a new sidebar that should work. However I cannot figure out how to add the template to the dashboard so that when I edit the sidebar portion, I can add a custom template to it. The link was great, but it did not address this part.
adamjohnson replied on at Permalink Best Answer Reply
If you are using your scrapbook, there is a link there. Dashboard > Scrapbook > XYZ Scrapbook > Your block (link on right for custom template).

Also, seems like you should be able to click on the block and select custom template.

Option two would be to check your .nostar class. You might have to change it from being just .nostar a in your CSS file to something like

#page #central #sidebar .nostar a { background: none; }

It's likely the ID's are overriding your class 'cause of specificity.