Rogelio's picture

Hi, i have grouped results in Views with field "Tipo", now i would like to add color and change the size of this group title, is there any way or any module to do this?

thanks

Accepted answer

Hi @Rogelio

The best way to do this is by working out what CSS selector to use and add some CSS to format that. Depending how you're theming the site will depend where that CSS goes; some themes allow custom CSS to be added in settings, while others will need the "CSS Injector" module.

To work out what CSS selector to use:

  1. look at the view where it is used
  2. Right click on the first grouping field and select "Inspect element"
  3. Take a screenshot that shows that bit of HTML and the selectors to the top of the view and slightly below.

We can then hopefully help you identify what selector to use to add your styling to.

Comments

Hi @Rogelio

The best way to do this is by working out what CSS selector to use and add some CSS to format that. Depending how you're theming the site will depend where that CSS goes; some themes allow custom CSS to be added in settings, while others will need the "CSS Injector" module.

To work out what CSS selector to use:

  1. look at the view where it is used
  2. Right click on the first grouping field and select "Inspect element"
  3. Take a screenshot that shows that bit of HTML and the selectors to the top of the view and slightly below.

We can then hopefully help you identify what selector to use to add your styling to.

Rogelio's picture

thanks yorkshirepudding, i used the CSS Injector option with this code and it works

.views-table caption {
    font-weight: bold;
    color: blue;
    font-size: 26px;
}