SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK...This should be very basic...im just not seeing the problem: I've created and external stylesheet and am linking to it in my HTML.
    I've saved this as a text file: example: test.css
    But it's still not linking.

    Here's My StyleSheet: (this is all, do I need to declare this a style?)

    .heading_1{font-family:verdanna,arial,helvetica,sans-serif;
    font-size:16pt;
    color:#ffffff;
    font-weight:bold}

    .heading_2{font-family:verdanna,arial,helvetica,sans-serif;
    font-size:14pt;
    color:#993300;}

    .body_text{font-family:verdanna,arial,helvetica,sans-serif;
    font-size:12pt;
    color:#000000;}

    And in my HTML I <span class=".body_text">test</span>

    Any ideas why this wouldn't be working?


  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)
    this is the way you link in an external stylsheet.

    <link rel="stylesheet" href="your_stylesheet.css" type="text/css">

    put that in your HEAD tag.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also, you are spelling verdana wrong....

    I should have asked this in my first post, but what is your page doing or not doing?

    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ..Ya...I already have the
    <link....> in my HTML site...

    My HTML page is just displaying the default text of what I place between <span>.

    I thought it was maybe a saving issue, since stylesheets have to be saved as a text document?


  5. #5
    SitePoint Zealot
    Join Date
    Nov 2000
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post the css file, and the html file. It would be easier to figure out the problem that way. It could be the way you access the css from within the html file.


  6. #6
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well...I finally got the external sheets working..
    --But I have a New Problem:
    My stylesheet is: "style1.css"

    I have three declared style classes, i.e.
    .heading1
    .heading2
    .text

    However, All of these work execpt .heading1.
    I've checked the syntax up and down and there are no problems.
    Does anyone have an idea why a style wouldn't be read?
    -Cheers--

  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)
    Without seeing how you are using the styles I can't tell you, but I will suggest cleaning up your stylesheet a bit. Put spaces after your selectors and each individual value:

    .body_text { font-family: verdana,arial,helvetica,sans-serif; font-size:12pt; color:#000000;}

    I doubt that is causing your problems, but it is ALWAYS a good idea to have proper code.

    You have already posted your stylesheet. Why don't you post one of the calls to the heading1 style and let us examine it. Cool?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's my current stylesheet..
    for some weird reason its not reading the top style...
    whether that be; .head1, .head2, .body ?
    Any ideas?

    <style type="text/css">

    .head1{font-size:18pt;
    color:#ffffff;}

    .head2{font-size:16pt;
    color:#ffffff;}

    .body{font-size:12pt;
    color:#ffffff;}
    </style>

  9. #9
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What browser are you getting errors in? Is it all of them? Or just one in particular?

    One thing you should start doing is putting comments tags around your style tags like so:

    <style type="text/css">
    <!--

    .head1{font-size:18pt;
    color:#ffffff;}

    .head2{font-size:16pt;
    color:#ffffff;}

    .body{font-size:12pt;
    color:#ffffff;}

    -->
    </style>

    please post onf of your style calls that isn't working so we can check it out

    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  10. #10
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers...for the help creole.

    Got the external sheet working this morning.
    Basically in my external style I got rid of the style tags and the comment tags and it works fine across browser/platform.

  11. #11
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ahhhh...that would do it...the external stylesheet needs to be plain text and no extra stuff (other than the styles themselves of course)
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •