SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    CSS Opening Line in the Head (CSS Declaration)

    Sitepoint Members,
    CSSLint.net says I have a lot of problems with my css declartion. I have it in the Head (don't want it in a separate file). Firefox's HTML Validator Add On (usind "tidy") has the declaration highlighted in blue.
    I have now
    <style type="text/css" media="screen,projection,tv">

    Using http://www.w3.org/TR/html401/present/styles.html I tried changing it to

    <META http-equiv="Content-Style-Type" content="text/css" media="screen,projection,tv">
    tried
    <http-equiv="Content-Style-Type" content="text/css" media="screen,projection,tv">
    and tried
    <Content-Style-Type" content="text/css" media="screen,projection,tv">

    but none of them worked, they all made a mess of mt site. What's wrong with
    <style type="text/css" media="screen,projection,tv">
    in the head?

    Thanks,

    Chris

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Chris77 View Post
    What's wrong with
    <style type="text/css" media="screen,projection,tv">
    Nothing that I can see.

    Perhaps the error is actually occurring somewhere else?

  3. #3
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ralph,
    I came across this site and it looks like the different ways you declare css are kinda close. I wonder if I have too much in there.

    For external CSS code they have
    <link rel="stylesheet" type="text/css" href="mystyle.css">

    for internal CSS code they have
    <style>....</style>
    I have
    <style type="text/css" media="screen,projection,tv">
    Maybe I should have
    <style media="screen,projection,tv"> ?
    Chris

  4. #4
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That didn't work. The Firefox add on said type="text/css" is supposed to be in there.

  5. #5
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I fugured it out - you're not supposed to put in the declaration on that site. Got zero errors 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
  •