zunky Posted March 11, 2015 Share Posted March 11, 2015 Hello everyone! I am a newbie to html and css. And I just came across a problem which is the following. I start the html with this. <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="css/txt" href="main_page_style.css"> </head> The linking works so if i modify the css file it make the change.But I just find out if I open it with Chorme. Otherwise if I open it with firefox or IE there are no styling on the html like there would be no css. I don't know what is the problem because in Chrome it looks perfect. Please help me. Looking forward some help Thanks Link to comment Share on other sites More sharing options...
davej Posted March 11, 2015 Share Posted March 11, 2015 That is not enough information. You probably have errors in your HTML or in your CSS and Chrome is just being more forgiving. Try... http://validator.w3.org/ Link to comment Share on other sites More sharing options...
zunky Posted March 11, 2015 Author Share Posted March 11, 2015 I just validated both the html and the css and the validator said both OK but I still have the problem. Any other idea? Link to comment Share on other sites More sharing options...
zunky Posted March 11, 2015 Author Share Posted March 11, 2015 OK I found out the what was the problem. here: <link rel="stylesheet" type="css/txt" href="main_page_style.css"> It must be type="txt/css" . anyway thanks for the help Link to comment Share on other sites More sharing options...
Ingolme Posted March 12, 2015 Share Posted March 12, 2015 That would be text/css Link to comment Share on other sites More sharing options...
davej Posted March 12, 2015 Share Posted March 12, 2015 It is interesting that this validates with no error... <!DOCTYPE html><html><head><meta charset="utf-8"/><title>t</title><link rel="stylesheet" type="garbage1/garbage2" href="filename.css"/></head><body></body></html> Link to comment Share on other sites More sharing options...
Ingolme Posted March 13, 2015 Share Posted March 13, 2015 The validator doesn't care what's inside most attributes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now