#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    2
    Rep Power
    0

    Problems with my css file?


    I just got hosted and I'm uploading my files but my css file isn't working. Here is my code:


    <html>
    <head>
    <style type="text/css">
    <!--
    body {cursor: crosshair;}

    A:link {text-decoration: none; color: #ff0099; font-weight: none; cursor:crosshair;}
    A:visited {text-decoration: none; color: #ff0099; font-weight: none; cursor:crosshair;}
    A:active {text-decoration: none; color: ff9933; font-weight: none; cursor:crosshair;}
    A:hover {text-decoration: none; color: #ff6633; font-weight: none; cursor:crosshair;}

    A.link:link {text-decoration: none; color: #ff0099; font-weight: none; cursor:crosshair;}
    A.link:visited {text-decoration: none; color: #ff0099; font-weight: none; cursor:crosshair;}
    A.link:active {text-decoration: none; color: ff9933; font-weight: none; cursor:crosshair;}
    A.link:hover {text-decoration: none; color: #ff0066; font-weight: none; cursor:crosshair; background-color: #ffcccc; border-top: #ffffcc 1px dotted; border-bottom: #ffffcc 1px dotted;}

    BODY
    {
    scrollbar-3dlight-color: #ff9999;
    scrollbar-highlight-color: #ffcccc;
    scrollbar-face-color: #ff9999;
    scrollbar-shadow-color: #ff9999;
    scrollbar-darkshadow-color: #ffffcc;
    scrollbar-arrow-color: #ff9999;
    scrollbar-track-color: #ffffcc;
    }

    body, td, iframe
    {font-size: 8pt;
    font-family: tahoma, verdana;
    color: #ff6633;
    background-color: transparent;}
    -->
    </style>
    </head>
    </html>


    Is there something wrong with it?

    My index page is linked to it using this code:


    <LINK REL=stylesheet HREF="main.css" TYPE="text/css>

    My site used to be on Geocities and it was working fine on there but it's not workign now. What am I doing wrong??
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    12
    Rep Power
    0
    First things first, you don't put the body tags in the stylesheet file.
    You start with:
    <!--
    CSS code goes here.

    You end with:

    -->

    For linking it to your page:

    Maybe it was just an error in typing your post, but if this is the real code:
    Code:
    <LINK REL=stylesheet HREF="main.css" TYPE="text/css>
    then you are missing your last quotation mark after the type, which should become:
    Code:
    <LINK REL=stylesheet HREF="main.css" TYPE="text/css">

    Also, just for sake of simplicity and organization, put your body declarations together.

    I.E.
    Code:
    body {cursor: crosshair;}
    and
    Code:
    BODY 
    { 
    scrollbar-3dlight-color: #ff9999; 
    scrollbar-highlight-color: #ffcccc; 
    scrollbar-face-color: #ff9999; 
    scrollbar-shadow-color: #ff9999; 
    scrollbar-darkshadow-color: #ffffcc; 
    scrollbar-arrow-color: #ff9999; 
    scrollbar-track-color: #ffffcc; 
    }
    becomes

    Code:
    BODY 
    {
    cursor: crosshair; 
    scrollbar-3dlight-color: #ff9999; 
    scrollbar-highlight-color: #ffcccc; 
    scrollbar-face-color: #ff9999; 
    scrollbar-shadow-color: #ff9999; 
    scrollbar-darkshadow-color: #ffffcc; 
    scrollbar-arrow-color: #ff9999; 
    scrollbar-track-color: #ffffcc; 
    }
    Oh yeah, one last simple detail, if you are validating for XHTML, then in your link, you would need to end it in its own tag, better illustrated than explained.
    Code:
    <LINK REL=stylesheet HREF="main.css" TYPE="text/css" />
    That should pretty much take care of your CSS woes for now.
    Good luck.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    122
    Rep Power
    12
    This is the normal layout-

    <html>
    <head><title>###</title>

    <script type = "text/javascript">

    // javascript here.

    </script>

    <style type="text/css">
    // styles here
    </style>


    </head>

    <body>

    //content here

    </body>
    </html>
    ~mgb
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    2
    Rep Power
    0
    Ahh thank you guys. That was helpful. Although my problem was something completely different. Heh. Well anyways, I figured it out.

    [begin shameless self-promotion]

    http://fadeout.sp0rked.org !!!

    [end shameless self promotion]

IMN logo majestic logo threadwatch logo seochat tools logo