6 Replies Latest reply on Feb 1, 2016 7:16 AM by ian@greathugethings.com

    how to format cascading styles?

    ian@greathugethings.com

      I've always heard that style elements could be separated out the way they are in CSS, but never made it work. This is the first time I've had a real-world use case.

       

      For the layout of a school yearbook, I've got 250+ photos with captions. (Name, favorite book, favorite school memory, etc.). The name is one P style, the 'questionnaires' are a second P style, the 'questions' have a C style applied.

       

      The yearbook layout means that about half of these text blocks are on one side of the photos they describe, and the other half on the other side. So my preference, if it's possible, is to have a 'modifier' style that sets left-align or right-align, overriding any alignment preference that's baked into either name or questionnaire, without touching any of the other elements (i.e. without changing their face).

       

      Name has an effect applied through paragraph shading, so I want it to remain a P style.

        • 1. Re: how to format cascading styles?
          Willi Adelberger Most Valuable Participant

          CSS is a concept from Web- and EPUB-desing, not from Text Layout Programs.

          In InDesign (as well as in Quark Xpress, Adobe FrameMaker, also in MS Word and many other programs) you work with styles.

          InDesign has Paragraph, Character, Table, Cell and Object Styles.

          A style in any of these categories can be based on another style, which makes global changes easy and fast.

           

          For pages exist the concept Master and Pages. Any page should be based on a Master, a Master itself can also be based on a different Master.

           

          You document should be a document with facing pages. This is an option in the New Document… dialog and can later be changed (with some problems) in File > Document Setup…

           

          When it comes to the alignment, there exist in InDesign several automatic alignments which should be defined via Paragraph Styles:

          Left, Centered, Richt, Justify last line left, Justify last line centered, Justify last line right, Justified last line also justified, toward the spine, away from the spine.

          The last two of them change the alignment if the text changes from a left side to the right side of a spread.

           

          When it comes to the HTML tags like P you can specify them in Paragraph, Character and Object Styles. These will be used when you export as HTML, EPUB or Publish Online. Also some limited tagging is used in PDF tagged Export.

          • 2. Re: how to format cascading styles?
            ian@greathugethings.com Level 1

            So I cannot apply multiple paragraph styles, or multiple character styles, to a single element.  E.g.:

             

            I can't apply para style STUDENT_NAME to two different elements, then apply an additional style called LEFT_ALIGN to the first, and a style called RIGHT_ALIGN to the second (while preserving the properties in STUDENT_NAME).

             

            Instead, the way to accomplish this would be to make a style called STUDENT_NAME, then two more styles, called STUDENT_NAME_LEFT and STUDENT_NAME_RIGHT, with the different alignments.

             

            If I have that right, it's okay, it just adds some drag to the style assignment (since I can't automate it through GREP assignment).

            • 3. Re: how to format cascading styles?
              John Mensinger Adobe Community Professional & MVP

              ian@greathugethings.com wrote:

               

              Instead, the way to accomplish this would be to make a style called STUDENT_NAME, then two more styles, called STUDENT_NAME_LEFT and STUDENT_NAME_RIGHT, with the different alignments.

              I'd say you're on the right track with that. One other step you can take would be to use the "Based on:" feature. Make your main style, then set your LEFT and RIGHT variants to be Based On it. That way, any changes you make to the main style will also affect the variants.

              • 4. Re: how to format cascading styles?
                SJRiegel Adobe Community Professional & MVP

                ian@greathugethings.com wrote:

                The yearbook layout means that about half of these text blocks are on one side of the photos they describe, and the other half on the other side.

                If the alignment of the text is determined by the page it's on, then you could use just one style, and set your alignment relative to the spine.

                These two paragraphs share the same style, but are on opposite pages:

                Screenshot 2016-02-01 08.43.41.png

                • 5. Re: how to format cascading styles?
                  Willi Adelberger Most Valuable Participant

                  You don't need 2 paragraph styles for left and right, create one single one with alignment toward or from the spine. Relative to the spine as I wrote before.

                  You can apply above any paragraph style any character style but you can include character style in a paragraph style via GREP styles, nested styles, initial letter, line wise, bullets and numbers.

                  • 6. Re: how to format cascading styles?
                    ian@greathugethings.com Level 1

                    I know about toward and away from spine; the reason it's not the right solution here is that the different alignments appear on the same page.