Announcement Announcement Module
Collapse
No announcement yet.
Attaching .css files to existing .html files Page Title Module
Move Remove Collapse
Search Search Module
Collapse

Advertisement Advertisement Module
Collapse

Featured Images Featured Images Module
Collapse

Mediabistro Creative Sites Mediabistro Creative Sites Module
Collapse
Latest Topics Latest Topics Module
Collapse

  • <b>
    Reply to Design Assignment
    <b>
    I took a chance and downloaded the PDF.

    Anyway, what do you mean about mimicking a design? What design are you trying to mimic?

    As for a grid, yeah, I can see that you've...
    Today, 04:34 PM
  • grphxdsner
    Comment on Question about printing PDF and matching color
    grphxdsner
    You and I both think it's odd... and to be honest its from a very large well known ad agency so it is even more surprising.

    I am not the printer. I am a designer and I am leading the design...
    Today, 04:32 PM
  • chr2014
    Reply to Paint Shop Pro 5
    chr2014
    Thanks Cosmo...

    I downloaded the file but it put utilities on my computer that I had to delete.

    It would be nice if you could just download the paint program without having unwanted...
    Today, 04:21 PM
  • mikelamar
    Reply to Changing color mode InDesign
    mikelamar
    And how I do that? Please enlighten me !!!
    Today, 04:19 PM
  • <b>
    Comment on Advice for logo
    <b>
    In a typeface design, little quirks in the glyphs are typically repeated throughout the entire character set. Isolate one glyph from the font, however, and a small quirk can look like a mistake since...
    Today, 04:19 PM
Advertisement Advertisement Module
Collapse

Sponsors Sponsors Module
Collapse

X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Attaching .css files to existing .html files

    Hi there,
    I have designed my site without css, now I like to change the background colour and font colour of all my pages. There are quiet a lot. So I thought the quickest way to do so is attaching a .css style sheet to my existing html files. Is this possible? I'm using Dreamweaver. Can someone help me with this? I have no idea how to do this. Much appreciated. Thanks.

  • #2
    Sure.

    Within the head just add a link to the css document.
    Code:
    <link rel="stylesheet" type="text/css" href="styles.css" />
    Professional Pixel Pusher — Designing the world around you. | Working daily to reach 10,000 hours of practice.

    Comment


    • #3
      Thanks for the quick reply Ckret, I'm sorry but I don't quiet understand what to do. Can you break it down a bit? Thanks.

      Comment


      • #4
        Within Dreamweaver create a new css document( File > New > under "Page Type" select "CSS". Save the file in the same folder as your .html document with the name of "styles.css"

        In your html document between the <head> tags add "<link rel="stylesheet" type="text/css" href="styles.css" />"

        Should look something like:

        Code:
        <head>
        <link rel="stylesheet" type="text/css" href="styles.css" />
        <!-- Other code might go here if you are calling other files or have meta data. -->
        </head>
        <body>
        ......
        Professional Pixel Pusher — Designing the world around you. | Working daily to reach 10,000 hours of practice.

        Comment


        • #5
          Thanks, but how do I apply this procedure to 40 documents at the same time? Do I have to enter the details in the head of each html file?

          Comment


          • #6
            Originally posted by Spix View Post
            Thanks, but how do I apply this procedure to 40 documents at the same time? Do I have to enter the details in the head of each html file?
            Build a template in Dreamweaver for your main structure that includes the tag for the stylesheets. Then apply to the forty pages.

            or copy and paste it into all forty...
            I'd rather be hated for who I am, than loved for who I am not. ~ Kurt Cobain

            Comment


            • #7
              Thanks Audentia, can I build a template at this stage where all 40 pages are already designed? Or is it too late now?

              Comment


              • #8
                Its a little time consuming to do it right now, but in terms of updating the pages down the road it will make edits a LOT easier.
                Professional Pixel Pusher — Designing the world around you. | Working daily to reach 10,000 hours of practice.

                Comment


                • #9
                  Thanks guys! Very helpful stuff.

                  Comment


                  • #10
                    Originally posted by Spix View Post
                    I have designed my site without css, now I like to change the background colour and font colour of all my pages.
                    Bear in mind that if you've used deprecated inline tags in your existing code, then those are going to override your new CSS styles, so you'll need to remove them in order for your CSS to work properly.

                    For example, the code below will override any styles that are in your external stylesheet:
                    HTML Code:
                    <p><font face="Verdana, Geneva, sans-serif">Duis aute irure dolor <strong><font color="#006666">quis nostrud</font></strong> exercitation sed do eiusmod tempor incididunt. <a href="#"><font color="#0000ff">Lorem ipsum dolor sit amet</font></a>, ut labore et dolore magna aliqua. In reprehenderit in voluptate ut enim ad minim veniam, <em>quis nostrud exercitation</em>.</font></p>
                    Digi
                    The world is divided into people who think they are right.
                    —Anonymous

                    Comment


                    • #11
                      Can you do a find and replace, i do that all the time when coding...just gotta be careful, some programs do it and there's no going back once it's done.

                      Originally posted by Spix View Post
                      Thanks Audentia, can I build a template at this stage where all 40 pages are already designed? Or is it too late now?
                      “Pain is temporary. Quitting lasts forever.” Lance Armstrong

                      Comment


                      • #12
                        So long as the pages are built in a way that the navigation is broken out in the code and all its own... and then the "middle section" or bulk of the pages are their own stuff you can apply templates after they are built.
                        Make your template in dreamweaver make sure it's saved as a template in the root folder of your site.
                        Then one each page delete it's navigation and other stuff that is all the same...
                        then you go to Modify -> Templates -> Apply to Page
                        It will add the template and you just have to tell it which sections of the template to put the code that already exists.

                        I think I got that all explained okay... I just learned how to do this a few weeks back so forgive me if it's not perfect...
                        I had a good online tutorial... let me see if I can find it...
                        I'd rather be hated for who I am, than loved for who I am not. ~ Kurt Cobain

                        Comment


                        • #13
                          Oh... I think this is the one I used... but there are lots if you google it...
                          http://www.entheosweb.com/website_de...r_template.asp
                          I'd rather be hated for who I am, than loved for who I am not. ~ Kurt Cobain

                          Comment


                          • #14
                            search & replace.

                            Really, Dreamweaver is king. It can also search out and replace code in a folder of documents.

                            Trust me this works. I've retrofitted an archive site with over 18,000 pages in less than 20 hours.

                            You can also use this to search out line formatted code and replace with css code.

                            oh, and if you are not sure...just make a duplicate of the folder and work in that.

                            Jade

                            Comment


                            • #15
                              Originally posted by Drazan View Post
                              oh, and if you are not sure...just make a duplicate of the folder and work in that.
                              Seconded. *twitches; whimpers at the memory of what can happen when you don't make a backup copy before a doing global search & replace*

                              Digi
                              Last edited by digizan; 10-09-2009, 01:29 AM.
                              The world is divided into people who think they are right.
                              —Anonymous

                              Comment

                              Mediabistro A division of Prometheus Global Media home | site map | advertising/sponsorships | careers | contact us | help courses | browse jobs | freelancers | content | member benefits | reprints & permissions terms of use | privacy policy Copyright © 2014 Mediabistro Inc. call (212) 389-2000 or email us
                              Working...
                              X