Hi,

I've been looking at the glossary view that comes with Views 2, with an aim to theme it.
Nancy Dru has done a nice job here http://nanwich.info/glossary

Eh, how did she do it?

TYIA

Comments

ludo1960’s picture

Anyone suggest where to start?

ludo1960’s picture

So I targeted the css:

.view-my-gloss {
text-align: center;
}
.views-summary {
font-size: 1.5em;
}

However I just want to change the header (the bit with A B C in it) The text-align: center; changes the alignment of the whole table and putting text-align: center; in the .views-summary has no effect, whilst the fontsize is changed just for the header.

Any CSS experts want to take a stab at this?

john.kenney’s picture

this probably isn't too helpful as to CSS styling, but the glossary page you point to was not created using views, but with the glossary module (which is a module i also use).

only just yesterday i took a quick look at the views 2 glossary and it appears to do a fairly different thing than this.

ludo1960’s picture

I dont have the glossary module installed, the page is created from the glossary view that comes with views.

ludo1960’s picture

.... a bit clearer now:

From views-view-summary-unformatted.tpl.php
<?php foreach ($rows as $row): ?>
  <?php print (!empty($options['inline']) ? '<span' : '<div') . ' class="views-summary views-summary-unformatted">'; ?>
    <?php if (!empty($row->separator)) { print $row->separator; } ?>
    <a href="<?php print $row->url; ?>"><?php print $row->link; ?></a>
    <?php if (!empty($options['count'])): ?> *******Removing the "!" gets rid of the count ***********
      (<?php print $row->count; ?>)
    <?php endif; ?>
  <?php print !empty($options['inline']) ? '</span>' : '</div>'; ?>
<?php endforeach; ?>

In my Css I now have:

.views-summary-unformatted {
background: #EDBFE7;
font-size: 1.5em;
padding: 3px;
text-align: center; 
}

But the text-align: center has no effect? What do I have to add to get the A B C to be center aligned?

ludo1960’s picture

Had to target .attachment-before with the CSS:

.attachment-before {
background: #EDBFE7;
text-align: center; 
font-size: 1.2em;
border: 2px solid #999;
padding: 5px;
font-weight: 700;
}