0

I have a content type "page with fields" which I made out of "Basic page" by adding two text fields at the beginning of the page which now looks like this:

  • Page title
  • Field1 Label: field1 text
  • Field2 label: field2 text
  • Here goes the body field text which is long text.

The problem is the lack of space between the body text and the fields 1 and 2. Now I want to add some custom CSS styles to the body field in order to put some extra space and later to be able to add some other visual changes.

My theme is Bartik 7.26 on Drupal 7.

1

Use the "html inspector" of your browser (Ctr-Shift-I for Chrome) to find the the css classes of thoses fields.

Then add the proper css code in /themes/bartik/css/style.css.

That will be the quickest way to do it but I strongly recommend you to create a sub-theme of the bartik theme (https://drupal.org/node/225125) so if the theme gets updated, you won't loose your changes.

You should check out Display Suite too (https://drupal.org/project/ds), it a fantastique module to change the way nodes are displayed.

  • Thanks @leseulsteve, I have already created subtheme and I'm going to check out the Display Suite – vladiz Feb 7 '14 at 22:20
  • Adding CSS styles to /themes/bartik/css/style.css is exactly what I needed. Actually I added the CSS styles in the sub-theme css sheet (sites/all/themes/mysubtheme/css/mysubtheme.css) – vladiz Feb 11 '14 at 19:48

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.