SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS help (newbie)

    I've been building a website using Dreamweaver, and basically all of my site is HTML, no java, none of that stuff. I'm still building the site, it's not yet published on the web, but I'd like to use stylesheets to help with certain things like fonts and updating.

    I have roughly 30 pages or so, and I've been trying to use stylesheets in Dreamweaver and it doesn't look too bad, but there's a few things I'd like to know.

    I have a table at the top of every page with a banner logo in it. Right now I have it pointing to the .gif on my hard drive. Once I upload my site to the web, obviously I'd like to point it to the proper URL. How do I use CSS to do this, considering the fact that I have about 30 pages to do it for?

    The thing I don't understand about CSS is how do I make a change and it changes all the other pages? I tried making a simple change to my main stylesheet, but when I viewed my other pages, they hadn't changed. Is this because it's not published yet? I'm still VERY new to stylesheets and I'm confused as to how this simple process works.

    Sorry for going on for a while, but I'm just trying to make myself clear!

    Any feedback would be greatly appreciated.
    Thanks.

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jbit...CSS is not really used for images. To get the image at the top of every page you would be best served to use a template in Dreamweaver (DW) or use Server Side Includes (SSI). To use SSI your webhost would have to be configured to accept them and all of your pages would need the .shtml extension. Other than that is it a cinch. Do a search on the boards for Server Side Includes.

    Now, CSS is a great thing for updating. If you have 30 pages in your site, you obviously want to avoid having to edit 30 pages every tiem you make a style change. To solve this, CSS offers you the external stylesheet. Create a document that contains your style declarations like so:

    body {font-family: verdana; }

    (note, the external stylesheet does not need the <style type="text/css"> or any of that.) Name the document styles.css (where styles is any name you like). In the HEAD tag of every document you place this line of code:

    <link rel="stylesheet" type="text/css" href="path/to/styles.css" />

    Simply swap out the path/to/styles.css for the actual path and filename and you will be good to go. Any more questions? Feel free to ask them.

    One note...DW will not recognize external stylesheets so when you edit your DOC in DW, your styles won't show up.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you are going to use the same banner on all pages, you can create a DIV the size of the image and placed at the top of the page. Then set the bacground image to that image.
    Code:
    #divname {background-image: url of image;}
    You have to preview the page in the browser many times to see style changes.

    Is this all kosher advice, creole?
    Sketch
    Aaron Brazell
    Technosailor



  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't believe that Netscape supports the setting of background images using CSS.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as usual, you are right, Creole.

    Sketch
    Aaron Brazell
    Technosailor



  6. #6
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey quick reply!

    As for the banner logo thing, it was just an example. So far what I set up the stylesheet for was for the text (font, color).

    As for SSI, I'll do a search and check it out.

    I'll probably have some more questions so I'll come back to this thread.

    Thanks!

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the questions are about the same topic, then use this thread. If not, then please post a new thread. That way people can see if your thread is what they are looking for.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    SitePoint Enthusiast welded's Avatar
    Join Date
    Jun 2001
    Location
    vancouver.bc.ca
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a good quick-fix for your logo situation would be to use the global find and replace option in dreamweaver's edit menu. just define the folder where all your html pages are, make sure you've set it to look at the source code, then set it up so that dreamweaver will search for the code where you call the image off your hard drive and to replace it with whatever the path will be once it's online.
    just remember that you cannot undo changes to files you've edited with this technique unless they are currently open. i haven't had any trouble and have had to rely on this more than a couple times.
    it's amazing what velocity can do
    when human beings are in season


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •