SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css <link...> compatibility issue

    Hi --

    I'm re-designing my web site and have an issue I want to work out. I currently have <link rel="stylesheet" href="/ssi/NEWstyle.css" type="text/css"> in my .html doc.

    I also have the code:
    Code:
    <style type="text/css">
    P, TD, TR { font-size: 9pt }
    body{
    background-color: #CECECE; font-family: Verdana, Arial, Helvetica, sans-serif
    }
    </style>
    in the same .html doc. I'd like to have that code in the .css file so I can easily make changes if I wanted to. But when I place that code into the 'NEWstyle.css' doc, the .html page doesn't read it. It reads it fine when it's in the .html but not when it's put into my .css file.

    Any ideas why or how to solve? Thanks.

    Josh

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,549
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,
    You did remember to take the style tags out of your external file didn't you?

    If that's not it then post the external file so we can see.

    Paul

  3. #3
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Paul,

    Yea, in the external file, I did exclude the <style> tags! (I had to use them in my .html doc. -- I just realized that my page is actually a .php file, does that matter?

    Anyway, here's my external .css file:
    Code:
    <STYLE TYPE="text/css">
    P, TD, TR { font-size: 9pt }
    body{
    background-color: #CECECE; font-family: Verdana, Arial, Helvetica, sans-serif
    }
    .menu {font-family:verdana,Arial; font-weight:bold; font-size: 9pt}
    A.menu:link, A.menu:active{
     text-decoration:none;
     color:#FFFFFF;
     font-weight:bold;
     }
    A.menu:visited{
    	text-decoration:none;
    	color:#FFFFFF;
    	font-weight:bold;
     }
    a.menu:hover{
     color:#FFFFFF;
     text-decoration:none;
     font-weight:bold;
     }
    A:link, A:active{
     text-decoration:underline;
     color:#0000FF;
     }
    A:visited{
    	text-decoration:underline;
    	color:#0000FF;
     }
    a:hover{
    color:#808080; text-decoration: none
     }
     body {
    scrollbar-arrow-color: #D8DCEC;
    scrollbar-face-color: #9EA5CD;
    scrollbar-3dlight-color: #BEBEBE;
    scrollbar-highlight-color: #FFFFFF;
    scrollbar-shadow-color: #FFFFFF;
    scrollbar-darkshadow-color: #BEBEBE;
    scrollbar-track-color: #D8DCEC; 
    }
    
    </STYLE>
    I just noticed that there are 2 different styles for the <body> tag, one general and one for the scroll bar.

    Thanks.

    Josh

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

    If that's your external file then why are there style tags around it or did you just do that for the post.

    The external file should just be the css code there shouldn't be any style tags in there. This may be causing your problem if you have left the tags in.

    The css should work with ok with a php page and the 2 body declarations are ok because they define different elements.

    The scroll bar colour is an IE thing only. Also make sure you define your links in the correct order of Link, visited, hover & active otherwise there may be problems with the cascade.

    Hope this helps

    Paul

    Edit: I've just looked at your homepage from your sig : http://www.actorpoint.com//ssi/apstyle.css and you have indeed left the style tags in the external file. So take them out and see if that cures your problem. Paul
    Last edited by Paul O'B; Apr 21, 2003 at 15:34.

  5. #5
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Paul,

    Thanks a lot, that solved the problem. All this time I've had the <style> tags in the external file. Removing them fixed it.

    Josh

  6. #6
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    43 03' 16" N :::: 77 36' 03" W
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    one more thing, if you're using an xhtml doctype (or plan to use one in the future), make all <tags> "lowercase"
    There's no place like 127.0.0.1


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
  •