7 Replies Latest reply on Jul 7, 2006 12:46 PM by Newsgroup_User

    setting documnet font size

    TSemmes Level 1
      Can one set up a default font size using CSS? Using the body tag I can control the font face but not the size. This is my body style:

      body {
      font: 11px/1.3 Verdana, Arial, Helvetica, sans-serif;
      font-size: 11px;
      margin: 10px 14px;
      background-color: #AAB;
      }

      The default fonts appear in Verdana but not 11 pixels. Though the font size appears in the generic font tag, I repeated the font-size to make sure that wouldn't help but it doesn't make any difference. Any ideas?

      Tom
        • 1. Re: setting documnet font size
          jeremyluby Level 3
          Try it this way!

          body {
          font-family: Verdana, Arial, Helvetica, sans-serif;
          font-size: 11px;
          margin: 10px 14px;
          background-color: #AAB;
          }
          • 2. Re: setting documnet font size
            jeremyluby Level 3
            Can you give us a URL to the page, and then we can see if something else is going on. You may have another style that is overriding this CSS declaration.
            • 3. Re: setting documnet font size
              Level 7
              > font: 11px/1.3 Verdana

              This specifies 11px for the font on the page.

              Are you talking about what you see in preview or in DW's Design view?

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.dreamweavermx-templates.com - Template Triage!
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
              ==================


              "TSemmes" <webforumsuser@macromedia.com> wrote in message
              news:e8m99n$gmr$1@forums.macromedia.com...
              > Can one set up a default font size using CSS? Using the body tag I can
              > control
              > the font face but not the size. This is my body style:
              >
              > body {
              > font: 11px/1.3 Verdana, Arial, Helvetica, sans-serif;
              > font-size: 11px;
              > margin: 10px 14px;
              > background-color: #AAB;
              > }
              >
              > The default fonts appear in Verdana but not 11 pixels. Though the font
              > size
              > appears in the generic font tag, I repeated the font-size to make sure
              > that
              > wouldn't help but it doesn't make any difference. Any ideas?
              >
              > Tom
              >
              >


              • 4. Re: setting documnet font size
                Level 7
                Why? The way shown is perfectly fine.

                --
                Murray --- ICQ 71997575
                Adobe Community Expert
                (If you *MUST* email me, don't LAUGH when you do so!)
                ==================
                http://www.dreamweavermx-templates.com - Template Triage!
                http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                ==================


                "jeremyluby" <webforumsuser@macromedia.com> wrote in message
                news:e8m9gr$h19$1@forums.macromedia.com...
                > Try it this way!
                >
                > body {
                > font-family: Verdana, Arial, Helvetica, sans-serif;
                > font-size: 11px;
                > margin: 10px 14px;
                > background-color: #AAB;
                > }


                • 5. Re: setting documnet font size
                  TSemmes Level 1
                  It does seem to be something in my coding.
                  If I place text on a blank page and apply the style sheet the font size is correct. But if I place it in my template the font size is much larger as you can see here: http://www.svunet.org/mo/test.htm. I don't see an font tags that would effect the font size but is there anything I can do? The reason why I am asking this is because I need to import a huge and complicated table and don't want to have to apply a style to each line of type.

                  Tom
                  • 6. Re: setting documnet font size
                    Level 7
                    On Fri, 7 Jul 2006 18:31:19 +0000 (UTC), "TSemmes"
                    <webforumsuser@macromedia.com> wrote:

                    > body {
                    > font: 11px/1.3 Verdana, Arial, Helvetica, sans-serif;
                    > font-size: 11px;
                    > margin: 10px 14px;
                    > background-color: #AAB;
                    > }
                    >
                    > The default fonts appear in Verdana but not 11 pixels. Though the font size
                    >appears in the generic font tag, I repeated the font-size to make sure that
                    >wouldn't help but it doesn't make any difference. Any ideas?

                    As you note, the font-size: 11px is not needed. However, if your page is
                    rendered in quirks mode because of a missing, incomplete, or invalid
                    doctype, or if you have something in the source code before the doctype,
                    then the body's font size will not be properly inherited inside tables.

                    If that's the case, and a link to the page would enable someone to help
                    you spot it, then make sure the document has a valid and complete
                    doctype and that it has nothing before the doctype. Once done, the body
                    font size should be inherited properly.

                    Gary
                    • 7. Re: setting documnet font size
                      Level 7
                      You are creating pages that do not have a doctype. This will cause them to
                      render in quirks mode. In quirks mode, styles applied to <body> do NOT
                      inherit into table cells. Thus, you would have to add to your rule to
                      include a td in the selector. HOWEVER, you will find it's much more
                      reliable (not to mention safer) to begin including valid and complete
                      doctypes on your pages so that your pages will render in standards mode.

                      --
                      Murray --- ICQ 71997575
                      Adobe Community Expert
                      (If you *MUST* email me, don't LAUGH when you do so!)
                      ==================
                      http://www.dreamweavermx-templates.com - Template Triage!
                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                      ==================


                      "TSemmes" <webforumsuser@macromedia.com> wrote in message
                      news:e8md86$lfl$1@forums.macromedia.com...
                      > It does seem to be something in my coding.
                      > If I place text on a blank page and apply the style sheet the font size is
                      > correct. But if I place it in my template the font size is much larger as
                      > you
                      > can see here: http://www.svunet.org/mo/test.htm. I don't see an font tags
                      > that
                      > would effect the font size but is there anything I can do? The reason why
                      > I am
                      > asking this is because I need to import a huge and complicated table and
                      > don't
                      > want to have to apply a style to each line of type.
                      >
                      > Tom
                      >