4 Replies Latest reply on Jan 24, 2009 8:02 AM by Newsgroup_User

    CSS

    scorbobby Level 1
      Hello,
      I'm sure I am not explaining this well, but I wish to be able to use a style I've created for one page to be accessible for use on other web pages (all pages). I'd appreciate the help?
      Robert
        • 1. Re: CSS
          bregent Most Valuable Participant
          You want to use external style sheets. That's how you keep your styling consistent within your site.
          • 2. Re: CSS
            scorbobby Level 1
            Okay. Thanks; that's what I thought. But from there: when I click on the attach external style sheet I get a message box that asks for file/URL (or browse). What URL are they asking for?
            Do I add as a link or import?
            • 3. CSS
              martcol Level 4
              That'll be the URL of the style sheet. The style sheet is the file containing your CSS so mystyle.css or whatever you name it is the file you link to.

              It might look like this and is located in the head of your page:

              <link href="../css/stylepages.css" rel="stylesheet" type="text/css" media="all"/>

              With CSS there are three ways to apply it to your page. 1) like the above which is an external style sheet. 2) You can put code directly in the head of your page which is referred to as embedded or 3) in the actual HTML element in your page wich is referred to as in-line

              Regards

              Martin

              http://htmldog.com/guides/cssbeginner/applyingcss/
              • 4. Re: CSS
                Level 7
                scorbobby wrote:
                > Okay. Thanks; that's what I thought. But from there: when I click on the
                > attach external style sheet I get a message box that asks for file/URL (or
                > browse). What URL are they asking for?
                > Do I add as a link or import?

                I use a text editor to make an empty file and save it at the root of my
                site. I make sure it has ".css" extension. For example "global.css."
                Then, in DW, I use the "link to style sheet" thing to link to my
                already-created, although empty, stylesheet.

                In theory, you can use the "link to style sheet" thing to type in a URL
                to a style sheet that doesn't exist, and DW will create it for you at
                the location you specify. Be aware that you will not see this file in
                your site window because *it will not actually exist until you have
                created at least one style.*

                Some people like to "zero out" the attribute applied by default by
                browsers to some elements, since they can vary from browser to browser.
                So they make a generic stylesheet that starts with:

                html, body, ul, ol, li, p, h1, h2, h3, h4, h5, h6, form, fieldset, p {
                margin: 0;
                padding: 0;
                border: 0;
                }

                And save it as a .css file. Then they can just copy it to their current
                site as the basis for that site's stylesheet.

                JMS