How to change block background colors

[color=#282828][font=arial, verdana, tahoma, sans-serif]I've got an image I want to pop up as a background on our website.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]I've got it on there using firebug so only I can view it and looks great![/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]Problem is you cant see any of the block writing. The background color is dark and so is all the writing on the whole page.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif].[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]I know there is a way to do this, just cant pin exactly how to do it.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]I would like to make the block backgrounds a white or gray. So then I could see the writing on the webpage and So that the block will look like its floating on the background.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]My sidebox has a white background. But my central main box that has new products in it doesnt and you cant read any of the block writing. I just would like to know how to add a background color to any block?[/font][/color][color=#282828][font=arial, verdana, tahoma, sans-serif] [/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]Can someone just point me in the right direction of doing this?[/font][/color]

Add a unique user style class name to the block and then save it. (i.e. my_block)



Edit styles.css and the following to the bottom and save:



.my_block {
background-color:#000;
}

[quote name='ticeholdings' timestamp='1358775805' post='153249']

Add a unique user style class name to the block and then save it. (i.e. my_block)



Edit styles.css and the following to the bottom and save:



.my_block {
background-color:#000;
}


[/quote]



Alright well I couldn't get it to work.



The block on my front page right now with the products is using a grid list.



SO I found the grid list under public_html/skins/basic/customer/blocks/products/grid_list.tpl



i added that code and it didn't work.

This is whats in that folder:









{** block-description:products_grid **}



{if $block.properties.hide_add_to_cart_button == “Y”}

{assign var=“_show_add_to_cart” value=false}

{else}

{assign var=“_show_add_to_cart” value=true}

{/if}



{include file=“blocks/list_templates/products_list.tpl”

products=$items

columns=$block.properties.number_of_columns

no_sorting=“Y”

obj_prefix=“$block.block_id000”

item_number=$block.properties.item_number

no_pagination=true

show_name=true

show_sku=true

show_rating=true

show_features=true

show_prod_descr=true

show_old_price=true

show_price=true

show_clean_price=true

show_list_discount=true

show_discount_label=true

show_product_amount=true

show_product_options=$show_product_options|default:true

show_qty=true

show_min_qty=true

show_product_edp=true

show_add_to_cart=$show_add_to_cart|default:true

show_list_buttons=true

show_descr=true

but_role=“action”

separate_buttons=true

}

Why don't you just use Firebug addon for Firefox so you can find the CSS class that is coloring the background for the grid list?

You can assign a unique class to the particular block in the block manager, and then assign your own colors to the sub-class used in the default grid list style.

Like ticeholdings suggested above, in the block manager, assign a new CSS class to the block (my_block), then create a class for

.my_block .fixed-layout multicolumns-list {background:#xxx;} or whatever the sub-class is that's defined for the grid list. If you want to change the color of the font in the div, p, body or a tags, you have more CSS work to do.

[quote name='Magpie Don' timestamp='1358791900' post='153270']

Why don't you just use Firebug addon for Firefox so you can find the CSS class that is coloring the background for the grid list?

You can assign a unique class to the particular block in the block manager, and then assign your own colors to the sub-class used in the default grid list style.

Like ticeholdings suggested above, in the block manager, assign a new CSS class to the block (my_block), then create a class for

.my_block .fixed-layout multicolumns-list {background:#xxx;} or whatever the sub-class is that's defined for the grid list. If you want to change the color of the font in the div, p, body or a tags, you have more CSS work to do.

[/quote]



Well when I use firebug to find out where it is, it shows me a .css file that is in the var/ temp folders.





Ok lets see if I do this right.



Under public_html/skins/basic/customer

I locate the styles.css file in that customer folder.



Went to the bottom of the file and added.



[color=#666600].[/color][color=#000000]my_block [/color][color=#666600]{[/color]

[color=#000000]background[/color][color=#666600]-[/color][color=#000000]color[/color][color=#666600]:[/color][color=#880000]#000;[/color]

[color=#666600]}[/color]



Then went into the block that Im wanting to edit and put in my_block in the [color=#5F5F5F]User-defined CSS-class.[/color]



[color=#5F5F5F]Is that right?[/color]

wrong post

First, you should enable the my_changes addon and set up your my_changes folder with your own stylesheet for CSS additions and overrides. There is info in the KB on my_changes. If you don't start this way, you risk losing your changes in an update.



If you are running the store on a webserver and Firebug is showing the path to the stylesheet in the cache, then you probably are joining the CSS and have line 83 of config.local.php file, in CS-Cart root, set to:

'join_css' => true, // is used to unite css files into one file



If you turn this off ( 'join_css' => false) then you can see the actual path to the CSS file.

Turn it back on when you are finished.



Also, most color formatting is in the /skin/basic/customer/styles.css stylesheet, while layout and alignment is primarily in the base.css stylesheet. There are plenty of other stylesheets with the customer/addons folders, and that's another reason to put all your changes into your own sheet.

I never edit the default CS-Cart CSS files. I override them with the stylesheet in my_changes.



Don

[quote name='Magpie Don' timestamp='1358811777' post='153290'] First, you should enable the my_changes addon and set up your my_changes folder with your own stylesheet for CSS additions and overrides. There is info in the KB on my_changes. If you don't start this way, you risk losing your changes in an update. If you are running the store on a webserver and Firebug is showing the path to the stylesheet in the cache, then you probably are joining the CSS and have line 83 of config.local.php file, in CS-Cart root, set to: 'join_css' => true, // is used to unite css files into one file If you turn this off ( 'join_css' => false) then you can see the actual path to the CSS file. Turn it back on when you are finished. Also, most color formatting is in the /skin/basic/customer/styles.css stylesheet, while layout and alignment is primarily in the base.css stylesheet. There are plenty of other stylesheets with the customer/addons folders, and that's another reason to put all your changes into your own sheet. I never edit the default CS-Cart CSS files. I override them with the stylesheet in my_changes. Don [/quote]



Well I got this my_changes thing to work aright with you and another members help.



Problem is every time I change the wrapper, the background color disappears



Any reason why?

The User CSS class is the same.



UPDATE:

The wrapper that worked with the background block color was the mainbox general.

When I switch the wrapper to the sidebox general the color just goes away.