3

What is the recommended way to add a "clearfix" class to a div.views-row?

Note that I dont want to add the clearfix to all views, just a specific view.

Is this best done with a template override, or is there a mystical alter hook that will let me add in what I need in my template.php without having to override and thus maintain an entire views template file, just to add a class.

4

Is this views 3? If so if you go to the Settings for the format you can add a Row class (the description says "The class to provide on each row") which should do what you want without templates etc.

1
  • It is indeed Views 3, and this works perfectly! Thanks Malks, you learn something new (about views) everyday. Dec 7 '11 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.