0
  1. i have created a content type 'Article' which has a image field.
  2. Both the teaser and Full view use the image field.(Default Drupal views for content)
  3. Now the problem is this image field has the same CSS class.
  4. So both the teaser view and full view get the same properties.
  5. But i want the image in teaser view to align/float to left of teaser content, but to show in the top center region in the full view.
  6. Since the CSS class is same for both view i can not achieve my goal ( point 5)

So please suggest me a way to achieve point 5 without creating a new home page view in 'Views'

1

Just pick the field with right parent

on node teaser view - you will find class as "node-teaser"

and on full node view - you will find class as "node-full"

so its just matter of picking field with parent while applying the css. OR also you can have a separate template for your node-teaser view, check this link

| improve this answer | |

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.