Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Changing color or adding background to Grid modules

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Does anyone know of a way to add a color or background image to a Grid module?

I believe in the older templates you could change the color in the layout.css but I'm not finding a way to do that in the new T3 template, specifically Flux.

I would prefer to be able to either change the background color or add a background image if possible.

Thanks a ton!
  • Cody Gross's Avatar
  • Cody Gross
  • LIfetime Developer - Big Bamboo
  • 163 posts
  • 2 Thanks
  • Karma: 1
The administrator has disabled public write access.
Hi

You could either target the module position or add a module suffix to the module and target that instead with your css

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Ok. I found where I can change the body color behind the grid modules in the template.css file

I have not been able to find where to alter the or add a background color/image to the actual grid1, grid2, etc modules.
  • Cody Gross's Avatar
  • Cody Gross
  • LIfetime Developer - Big Bamboo
  • 163 posts
  • 2 Thanks
  • Karma: 1
The administrator has disabled public write access.
Hi

Please don't add or change css direct in the template.css file

You will to add css to the custom.css file

so you would need to paste the style you are changing in there and the new style you will need to create for the grid1, grid2 etc

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
If you do change css in the template.css file you risk it being overwritten if you compile less to css or if you update the template

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi Paul, I've got several offline templates that I play with and blow up and then restore!!

Any hints on what what css would alter the actual background of grid1, grid2, etc?

I tried playing with a custom module published to grid1 for example and entering in css values under advanced options but that didn't work.
  • Cody Gross's Avatar
  • Cody Gross
  • LIfetime Developer - Big Bamboo
  • 163 posts
  • 2 Thanks
  • Karma: 1
The administrator has disabled public write access.
Hi

So for example if I add a module suffix called center red to the motion module

I'm a social being - grid9

so it looks like center red

with the two separate words in the advanced tab > module class suffix

and then add css to target the module suffix

.center.red a {
color: #FF0000;
}

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Depending on the style you are targetting to either overide or add you can add the position to make the style more specific

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hmm... I add the css to the custom.css file correct?

I did this and then put center red in the module suffix of a custom html module published to grid5 and it did not work.
  • Cody Gross's Avatar
  • Cody Gross
  • LIfetime Developer - Big Bamboo
  • 163 posts
  • 2 Thanks
  • Karma: 1
The administrator has disabled public write access.
Do you have a link for it?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi Paul,

We are switching gears and moving to the MaxBiz template for this client.

But :)

I did figure out how to alter the background color of all modules using some css in the custom css file, but the Grid Modules of 6 or higher I could not figure out. Any suggestions? I think whatever the solution is will work on other templates as well.

I'm taking notes on all of the questions and if you don't mind I will post some tips in the near future.
  • Cody Gross's Avatar
  • Cody Gross
  • LIfetime Developer - Big Bamboo
  • 163 posts
  • 2 Thanks
  • Karma: 1
The administrator has disabled public write access.
Hi,

The best way to check is to use firebug or chrome developer tools and then inspect the element you are trying to change.

If the css is not working it may be being overridden by something else, in which case your custom rule will be crossed out and there will be another rule working which may be more specific or using an !important declaration.

If you don't see your custom rule in the elements panel then the selector may be wrong.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
Thanks!!
  • Cody Gross's Avatar
  • Cody Gross
  • LIfetime Developer - Big Bamboo
  • 163 posts
  • 2 Thanks
  • Karma: 1
The administrator has disabled public write access.
Good luck with the css

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers