Loading ...
Sorry, an error occurred while loading the content.

Vertical Align Equation Number in CSS

Expand Messages
  • R Shapp
    Hi Group, May I have your help please in vertically aligning text with a graphic on a single line? A scientist sent me a paper as a Word 2002 document for
    Message 1 of 5 , Apr 15, 2004
    • 0 Attachment
      Hi Group,

      May I have your help please in vertically aligning text with a graphic on a
      single line?

      A scientist sent me a paper as a Word 2002 document for posting on our club
      website. The document contains several equations which he produced as
      graphics using a third party program. He then assigned a number to each of
      his equations. When I converted the document to HTML using the Web Page
      Filtered option, the equation numbers are all aligned with the bottom of the
      line on which the equation appears. See an example below my signature.

      As you can see, the graphic containing equation (1) has a height of 86 pixels.
      I want the equation number. (1), to appear near the center of that 86 pixel
      space.

      I tried inserting "style='vertical-align:center'" in a few places, but it
      didn't seem to have any effect at all.

      I am using MSIE v6 and Navigator v7.1 for testing.

      Thank you for the help.

      Ray Shapp

      ********here below is the style definition for the MsoNormal
      paragraph***********

      p.MsoNormal, li.MsoNormal, div.MsoNormal
      {margin:0in;
      margin-bottom:.0001pt;
      font-size:12.0pt;
      font-family:"arial";}

      **********here below is the line containing equation
      (1)***********************

      <p class=MsoNormal align=center style='text-align:center'><b><span
      style='font-size:14.0pt'></span></b><span style='font-size:14.0pt'><sub><img
      width=222 height=86 src="gifs/rshft02.gif"></sub>
      <b>(1)</b></span></p>
    • Christine
      It s middle for vertical, center for horizontal. At least that works for me. :) Christine ... From: R Shapp [mailto:ras45@optonline.net] Sent: Friday,
      Message 2 of 5 , Apr 16, 2004
      • 0 Attachment
        It's "middle" for vertical, "center" for horizontal.
        At least that works for me. :)

        Christine

        -----Original Message-----
        From: R Shapp [mailto:ras45@...]
        Sent: Friday, April 16, 2004 01.48 AM
        To: ntb-html@yahoogroups.com
        Subject: [NH] Vertical Align Equation Number in CSS


        Hi Group,

        May I have your help please in vertically aligning text with a graphic on a
        single line?

        A scientist sent me a paper as a Word 2002 document for posting on our club
        website. The document contains several equations which he produced as
        graphics using a third party program. He then assigned a number to each of
        his equations. When I converted the document to HTML using the Web Page
        Filtered option, the equation numbers are all aligned with the bottom of the
        line on which the equation appears. See an example below my signature.

        As you can see, the graphic containing equation (1) has a height of 86
        pixels.
        I want the equation number. (1), to appear near the center of that 86 pixel
        space.

        I tried inserting "style='vertical-align:center'" in a few places, but it
        didn't seem to have any effect at all.

        I am using MSIE v6 and Navigator v7.1 for testing.

        Thank you for the help.

        Ray Shapp
      • R Shapp
        Hi Christine, Thanks for the reply. I wasn t sure about where to insert vertical-align:middle , therefore I tried it in the paragraph definition, in the
        Message 3 of 5 , Apr 16, 2004
        • 0 Attachment
          Hi Christine,

          Thanks for the reply.

          I wasn't sure about where to insert "vertical-align:middle", therefore I tried
          it in the paragraph definition, in the paragraph itself, and in both places,
          but the equation number refuses to budge. My first question is where should
          "vertical-align:middle" be inserted. My second question is to ask whether
          some other specification could be overriding the vertical alignment directive.

          I wonder about some factor overriding the alignment spec because I changing
          the font size value has no effect either. For example, I changed
          "style='font-size:14.0pt'" to "style='font-size:72.0pt'" but the size of the
          text remained unchanged.

          I'm using MSIEv6 and Navigator v7.1.

          Thanks for your help.

          Ray Shapp

          *******paragraph definition********

          p.MsoNormal, li.MsoNormal, div.MsoNormal
          {margin:0in;
          margin-bottom:.0001pt;
          font-size:12.0pt;
          vertical-align:middle;
          font-family:"arial";}

          ******specific paragraph**********

          <p class=MsoNormal align=center style='text-align:center'><b><span
          style='font-size:14.0pt'></span></b><span style='font-size:14.0pt'
          style='vertical-align:middle'><sub><img
          width=222 height=86 src="gifs/rshft02.gif"></sub>
          <b>(1)</b></span></p>
        • Christine
          I guess I misunderstood. I use a separate .css file, where all is declared in one place. It s easier for me when I do updates. My text looks like this:
          Message 4 of 5 , Apr 16, 2004
          • 0 Attachment
            I guess I misunderstood.
            I use a separate .css file, where all is declared in one place. It's easier
            for me when I do updates.

            My text looks like this:
            .CenMid {text-align: Center;
            vertical-align: Middle;}

            with .CenMid used in the page like this: <P class="CenMild">, for example.

            My fonts are declared without the '' or "" you've used around yours,
            separately (since it's inherited) like this:

            font-size: 12pt;
            font-family: Verdana, Garamond, SuzBudR, SuzBudC, Papyrus, Ariel, Serif;
            font-color: #OE4148;

            When I declare them for a special item, it's still declared in my main .css
            file like this:

            .Note {text-align: Center;
            vertical-align: Middle;
            font-size: 9;
            font-family: Verdana, Papyrus, Ariel, Serif;}

            Hopefully this will help?
            Christine

            -----Original Message-----
            From: R Shapp [mailto:ras45@...]
            Sent: Friday, April 16, 2004 11.10 AM
            To: ntb-html@yahoogroups.com
            Subject: Re: [NH] Vertical Align Equation Number in CSS


            Hi Christine,

            Thanks for the reply.

            I wasn't sure about where to insert "vertical-align:middle", therefore I
            tried
            it in the paragraph definition, in the paragraph itself, and in both places,
            but the equation number refuses to budge. My first question is where should
            "vertical-align:middle" be inserted. My second question is to ask whether
            some other specification could be overriding the vertical alignment
            directive.

            I wonder about some factor overriding the alignment spec because I changing
            the font size value has no effect either. For example, I changed
            "style='font-size:14.0pt'" to "style='font-size:72.0pt'" but the size of the
            text remained unchanged.

            I'm using MSIEv6 and Navigator v7.1.

            Thanks for your help.

            Ray Shapp

            *******paragraph definition********

            p.MsoNormal, li.MsoNormal, div.MsoNormal
            {margin:0in;
            margin-bottom:.0001pt;
            font-size:12.0pt;
            vertical-align:middle;
            font-family:"arial";}

            ******specific paragraph**********

            <p class=MsoNormal align=center style='text-align:center'><b><span
            style='font-size:14.0pt'></span></b><span style='font-size:14.0pt'
            style='vertical-align:middle'><sub><img
            width=222 height=86 src="gifs/rshft02.gif"></sub>
            <b>(1)</b></span></p>
          • R Shapp
            Hi Christine, The only reason I got into CSS at all is that the documents originate in Word, and are converted to HTML using Save As with the Web Page,
            Message 5 of 5 , Apr 16, 2004
            • 0 Attachment
              Hi Christine,

              The only reason I got into CSS at all is that the documents originate in Word,
              and are converted to HTML using Save As with the Web Page, Filtered option.

              Although I would be willing to tweak the embedded CSS for six equations in a
              four page document, I'm not willing to create separate CSS files.

              My work-around is to put each equation and its associated number into
              two-column tables. Now I'm in familiar territory, and can get the desired
              effect.

              Thanks for your help.

              Ray Shapp
            Your message has been successfully submitted and would be delivered to recipients shortly.