8 Replies Latest reply on Jun 20, 2008 11:11 AM by

    CSS to inline styles

    MisterEggMan
      I never thought I'd be asking this EVER. But, I need to convert CSS styles to inline styles. Can this be done in DW or does it need to be done by hand?
        • 1. Re: CSS to inline styles
          Level 7
          It would have to be done manually. DW can go the other way, but not this
          way.

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "MisterEggMan" <webforumsuser@macromedia.com> wrote in message
          news:g2jvm2$pl0$1@forums.macromedia.com...
          >I never thought I'd be asking this EVER. But, I need to convert CSS styles
          >to inline styles. Can this be done in DW or does it need to be done by
          >hand?

          • 2. Re: CSS to inline styles
            MisterEggMan Level 1
            When we add the styling to the text, it automatically creates a style as an internal stylesheet. How do I avoid this?
            • 3. Re: CSS to inline styles
              Level 7
              > How do I avoid this?

              By a) never using the Property inspector to style your text, and therefore
              b) making sure that you are always defined the CSS rule first so that you
              can apply it to the relevant tag, or allow it to cascade/inherit into the
              desired containers.

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "MisterEggMan" <webforumsuser@macromedia.com> wrote in message
              news:g2k1ee$rk4$1@forums.macromedia.com...
              > When we add the styling to the text, it automatically creates a style as
              > an internal stylesheet. How do I avoid this?

              • 4. Re: CSS to inline styles
                MisterEggMan Level 1
                But that doesn't answer how I can avoid automatically creating a style when I have text highlighted and, for example, hit the bold button. Right now, a style is automatically created and it needs to create inline styles.

                My team is creating emails and we can't use stylesheets, external or internal.
                • 5. Re: CSS to inline styles
                  Level 7
                  > My team is creating emails and we can't use stylesheets, external or
                  > internal.

                  You can use inline styles, or even embedded styles within the <body> tag,
                  but OK.

                  > But that doesn't answer how I can avoid automatically creating a style
                  > when I
                  > have text highlighted and, for example, hit the bold button.

                  In Preferences > General, select to use HTML instead of CSS.

                  --
                  Murray --- ICQ 71997575
                  Adobe Community Expert
                  (If you *MUST* email me, don't LAUGH when you do so!)
                  ==================
                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                  ==================


                  "MisterEggMan" <webforumsuser@macromedia.com> wrote in message
                  news:g2k5na$328$1@forums.macromedia.com...
                  > But that doesn't answer how I can avoid automatically creating a style
                  > when I
                  > have text highlighted and, for example, hit the bold button. Right now, a
                  > style
                  > is automatically created and it needs to create inline styles.
                  >
                  > My team is creating emails and we can't use stylesheets, external or
                  > internal.
                  >

                  • 6. Re: CSS to inline styles
                    MisterEggMan Level 1
                    >> My team is creating emails and we can't use stylesheets, external or
                    >> internal.
                    >
                    > You can use inline styles, or even embedded styles within the <body> tag,
                    > but OK.

                    Exactly, we can only use inline styles and not stylesheets. Dreamweaver will automatically create internal stylesheets rather than inline styles unless the preferences are changed to the settings that you mention.

                    If you know of a way to use an internal stylesheet and maintain formatting in any email client, I'd prefer to do it that way. But all sources that I've seen say that only inline styles should be used.
                    • 7. Re: CSS to inline styles
                      Level 7
                      Here's what I do. I create the page using an embedded stylesheet. When I'm
                      ready to publish, I copy the embedded stylesheet into the body of the page
                      (immediately below the <body> tag). That has worked pretty fine for me.

                      --
                      Murray --- ICQ 71997575
                      Adobe Community Expert
                      (If you *MUST* email me, don't LAUGH when you do so!)
                      ==================
                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      ==================


                      "MisterEggMan" <webforumsuser@macromedia.com> wrote in message
                      news:g2m2q9$7ik$1@forums.macromedia.com...
                      >>> My team is creating emails and we can't use stylesheets, external or
                      > >> internal.
                      > >
                      > > You can use inline styles, or even embedded styles within the <body>
                      > > tag,
                      > > but OK.
                      >
                      > Exactly, we can only use inline styles and not stylesheets. Dreamweaver
                      > will
                      > automatically create internal stylesheets rather than inline styles unless
                      > the
                      > preferences are changed to the settings that you mention.
                      >
                      > If you know of a way to use an internal stylesheet and maintain formatting
                      > in
                      > any email client, I'd prefer to do it that way. But all sources that I've
                      > seen
                      > say that only inline styles should be used.
                      >

                      • 8. Re: CSS to inline styles
                        what do you mean by DW can go the other way, but not this?