SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    @zoopedup radman's Avatar
    Join Date
    Oct 2002
    Location
    South Africa
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face CSS in dreamweaver

    Watsup..

    I want to control my entire websites link colours from one style sheet.. I think this would be convient incase i have a color palet change..

    how does this work? What code can i put at the top of each page to ref this style sheet? I use dreamweaver to build my pages!

    and what should the code in this style sheet look like...?

    I hope my question is clear as i had trouble explaining it...

    Lets say I have the below code in a style sheet how would i ref it from each page so that the pages take on these link/text color properties...?


    code:

    <style type="text/css" media="screen">
    a:link {
    color: #0000FF;
    background-color: #00FFFF;
    }
    a:visited {
    color: #990000;
    background-color: #33FFFF;
    }
    a:hover {
    color: #FF0000;
    background-color: #00FFFF;
    }
    a:active {
    color: #990000;
    background-color: #00FFFF;
    }
    </style>
    any help much appreciated... thanx.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,363
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,


    and what should the code in this style sheet look like...
    The css code should be like this without any html comments or style tags.:
    Code:
    a:link {
    color: #0000FF;
    background-color: #00FFFF;
    }
    a:visited {
    color: #990000;
    background-color: #33FFFF;
    }
    a:hover {
    color: #FF0000;
    background-color: #00FFFF;
    }
    a:active {
    color: #990000;
    background-color: #00FFFF;
    }
    Save that as something like mainstyles.css

    Then between the head tags of your document on every page of your site link to it like this.
    Code:
    <link href="mainstyles.css" rel="stylesheet" type="text/css">
    Any changes you make to the single stylesheet will then change on every page as required.

    Have a look at the FAQ here which should explain it for you:

    http://www.sitepoint.com/forums/show...9&postcount=10

    In Dreamweaver you can make selections from the design tab and attach or edit the stylesheets as required. Dw will construct the appropriate link tag for you. However, I find it easier to work in code view and put the styles in myself but you may want to read up on it anyway.

    Paul

  3. #3
    @zoopedup radman's Avatar
    Join Date
    Oct 2002
    Location
    South Africa
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    awesome thank you so much

    im gona go try it now..


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
  •