7 Replies Latest reply on Jun 11, 2011 7:38 AM by Iain Robinson

    (OT CSS/ePub) spacing problem between paras

    Iain Robinson Level 1

      Hi all

      I know this is OT but I'm sure someone here will have experience in this field. Working on a Contents page and I want the title "Contents" to have space after it, before the start of the contents copy. I can't add a margin-bottom value to it as it is styled with the same style as the titles throughout the book (so they all appear in the navigation menu) and they can't have space after so I am specifying in the CSS file that when this para is followed by the next para (the start of the contents) that second para has some space above it;


      p.A-head-article-title {  /*title style*/

      font-size: 200%;

      color: black;

      margin-right: 25%;


      margin-top: 0em;

      margin-bottom: 0em;


      p.contents-headings {  /*style of first line of contents copy*/

      color: #59277F;

      font-weight: bold;


      margin-top: 0em !important;

      margin-bottom: 0em !important;


      p.A-head-article-title + p.contents-headings {  /*this is intended to apply to p.contents-headings only when preceded by the title */

      margin-top: 2em !important;


      I have used this code before elsewhere and it works okay but I can't figure out why it is not working here. I did get it to work yesterday - the p.contents-headings is enclosed in a div (automatically created by ID CS5.5) and by referring to the div in the CSS code (p.A-head-article-title + div.story) it worked. I went off and added some additional (unrelated) styles to the CSS file and now this morning it is not working, whether I refer to the second item by div or the para style name.

      I removed all the margin information from the relevant styles, in case there was some sort of conflict, and that didn't help either.

      Anyone got any thoughts?