i need help aligning nodes in the views grid style. Each of my rows has 2 nodes but the problem am facing is that they are not aligned. in each row one node is slightly higher than the other. How can i create fixed grid dimensions so that each row is inline?

  • 1
    Jasmine When people offer answers that are good, you can acknowledge them by clicking the up arrow. It will help others to quickly find the best answers in the future. If you think it is the correct answer to your question then also click on the check mark. :) – Ashlar Nov 23 '11 at 20:11

I use the ccs_injector module to add css snippets to fix alignment issues like the one you described.

For example, the css I used to assign even widths on a 4 column grid and to vertically align the content:

td.col-1, td.col-2, td.col-3, td.col-4 {
width: 25%;
vertical-align: top;
text-align: center;
| improve this answer | |
  • 1
    You could use a single td declaration as well :) – giorgio79 Apr 12 '12 at 20:07

I have not worked with grids specifically, but in general layout is managed using css and theming. If you have not gotten into theming in Drupal yet you will need to get familiar with it. Check google, there are many good tutorials. You will also need a tool such as firebug, an add-on for the Firefox browser.

| improve this answer | |
  • thanks, i am quite familiar with css but not when it comes to views. will have a look though :) – Jasmine Ahmed Nov 23 '11 at 17:50
  • 2
    Are you familiar with firebug and Drupal theming? Firebug will tell you exactly what classes are determining the appearance in the view grid. You can then test the settings to find what you want and change them using a custom.css file – Ashlar Nov 23 '11 at 18:05
  • i am familiar with them. i have just tried what you advised and found the id tags for my grid. i just need to figure out how to align them. thanks. – Jasmine Ahmed Nov 23 '11 at 18:42

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.