#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Virginia Beach Virginia
    Posts
    11
    Rep Power
    0

    Question CSS not changing documents


    I am trying to do a simple CSS styling for a web project, but no matter what I do, I cannot get the CSS file linked to the HTML files to have any affect at all?? It is really annoying me, because I cannot even get started because of this, PLEASE help, and spare me the lecture about my coding please, I know I am new to this!!

    This is my BASIC HTML file:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     <html xmlns="http://www.w3.org/1999/xhtml"> 
    <?xml-stylesheet type="text/css" href="../../Downloads/untitled-2.css"?> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>Untitled Document</title>
    </head>  <body> HELLO WORLD!! </body> 
    </html>
    As you can see it does practically nothing except write a message on the screen. I wanted to use CSS to style the message, but it does not seem to be changing anything at all....
    This is my CSS file:

    Code:
     @charset "utf-8";
     body { 	
    background-color:#F6C; 	
    display:block; 	
    margin:auto; 	
    padding:2px; 	
    color:#0F3; 	
    border-bottom:solid #F03; 	
    font-family:Verdana, Geneva, sans-serif; 
    font-weight:bolder; }
    No matter what I do with this file there are no changes at all on the results, and I cannot see why....
    I am thinking that I am not linking the CSS file to the HTML document correctly, but I thought that was correct....
    Any advice will be greatly appreciated!!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    275
    this
    Code:
    <?xml-stylesheet type="text/css" href="../../Downloads/untitled-2.css"?>
    should be
    Code:
    <link rel="stylesheet" type="text/css" href="../../Downloads/untitled-2.css">
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Virginia Beach Virginia
    Posts
    11
    Rep Power
    0

    Talking


    Originally Posted by DonR
    this
    Code:
    <?xml-stylesheet type="text/css" href="../../Downloads/untitled-2.css"?>
    should be
    Code:
    <link rel="stylesheet" type="text/css" href="../../Downloads/untitled-2.css">
    Thanks a million yo!!

IMN logo majestic logo threadwatch logo seochat tools logo