Fix Drupal grid format views template for better group title styling

The Drupal Views grid format displays group titles using the <h3> tag.

The element is not classed so adding CSS is oddly difficult given how well Drupal content is structured.

The real problem, though, is the h3 element is not inside the div it’s associated with. This makes very common styling requirements impossible. For instance, you migth want the values to appear in a column with the h3 group title on top. You cannot do this with the default layout.

The solution is to move the h3 down “one line.”

Debug Drupal print view

Let’s say you’ve added the Lexicon module and now your page, when printed, includes lots of URLs in parentheses following links in your copy.

Quite annoying really.

How do you find out what classes might be associated with these links so that you can hide them using the print.css file?

The answer has nothing to do with Drupal.

You need to force the browser, let’s say Chrome, into print emulation mode.

Open Developer Tools.

Press Control-Shift-P. Enter rendering and select Show rendering.

Pages

Subscribe to Front page feed