replacing font tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • since
    New Member
    • May 2007
    • 14

    #1

    replacing font tag

    I am trying to replace the "<font size="2">" but I am having a difficult time finding the right font-size setting. Any help would be greatly appreciated. I can't seem to get it right for both IE and mozilla.

    Code: ( text )

    1.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    2.
    <html>
    3.
    <head>
    4.
    <style type="text/css">
    5.
    div.rolloverHel p {
    6.
    display: block;
    7.
    white-space:normal;
    8.
    width: 228px;
    9.
    border: 1px #238F85 solid;
    10.
    padding: 5px;
    11.
    text-decoration: none;
    12.
    FONT-FAMILY: 'Arial, Helvetica, sans-serif';
    13.
    FONT-SIZE: small;
    14.
    color: black; background: white; }
    15.

    16.
    </style>
    17.
    </head>
    18.
    <body>
    19.
    <table bgcolor="#EAF4F 3" cellpadding="4" >
    20.
    <tr>
    21.
    <td width="130px">
    22.
    <div class="rollover Help"><font face="Arial, Helvetica, sans-serif" size="2">
    23.
    <span class="colorBlu e">Test Run Name:</span>
    24.
    The name of the test run that is being modified.
    25.
    </font></div>
    26.
    </td>
    27.
    <td width="130px">
    28.
    <div class="rollover Help">
    29.
    <span class="colorBlu e">Test Run Name:</span>
    30.
    The name of the test run that is being modified.
    31.
    </div>
    32.
    </td>
    33.
    </tr>
    34.
    </table>
    35.
    </body>
    36.
    </html>
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Just remove the <font></font> stuff. It is overriding the CSS.

    (Sorry, I accidentally deleted the content of your post)

    Comment

    • since
      New Member
      • May 2007
      • 14

      #3
      Originally posted by drhowarddrfine
      Just remove the <font></font> stuff. It is overriding the CSS.

      (Sorry, I accidentally deleted the content of your post)
      I am trying to match the "<font size='2'>" with css. Basically get Example 2 to look like Example 1 with just using css. I need to find the right font-size setting for the css.
      Removing the doctype and setting font-size:x-small works for IE but not mozilla. I need to keep the doctype anyway, and that works for just IE>

      [html]
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
      <style type="text/css">
      div.rolloverHel p {
      display: block;
      white-space:normal;
      width: 228px;
      border: 1px #238F85 solid;
      padding: 5px;
      text-decoration: none;
      FONT-FAMILY: 'Arial, Helvetica, sans-serif';
      FONT-SIZE: x-small;
      color: black; background: white; }

      </style>
      </head>
      <body>
      <table bgcolor="#EAF4F 3" cellpadding="4" >
      <tr>
      <td width="130px">
      Example 1:
      <div class="rollover Help"><font face="Arial, Helvetica, sans-serif" size="2">
      <span class="colorBlu e">Test Run Name:</span>
      The name of the test run that is being modified.
      </font></div>
      </td>
      <td width="130px">
      Example 2:
      <div class="rollover Help">
      <span class="colorBlu e">Test Run Name:</span>
      The name of the test run that is being modified.
      </div>
      </td>
      </tr>
      </table>
      </body>
      </html>
      [/html]

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Not having a doctype puts IE into quirks mode and it won't work like any other browser.

        Remove the quotes in your css around the font family names. Also, everything should be in lower case. Change the font size to small.

        Comment

        • since
          New Member
          • May 2007
          • 14

          #5
          Originally posted by drhowarddrfine
          Not having a doctype puts IE into quirks mode and it won't work like any other browser.

          Remove the quotes in your css around the font family names. Also, everything should be in lower case. Change the font size to small.
          Dude that worked beautifully. Thx a billion.

          Steve

          Comment

          Working...