Chikwado Posted August 27, 2014 Share Posted August 27, 2014 Some one help: I made the following code to link to my html code. <link rel="stylesheet" href="mystyle.css" type="text/css" /> And It did not work, Althouth I am using opera browser. Some one help please. Link to comment Share on other sites More sharing options...
JamesB Posted August 27, 2014 Share Posted August 27, 2014 Is mystye.css in the same folder as the .html file which has that code? That code should work in Opera. Link to comment Share on other sites More sharing options...
davej Posted August 27, 2014 Share Posted August 27, 2014 Did you follow this tutorial? http://www.w3schools.com/css/css_howto.asp Link to comment Share on other sites More sharing options...
thescientist Posted August 27, 2014 Share Posted August 27, 2014 where's the code relative to the HTML? If you included it incorrectly due to the path, you would see a 404 in your browsers error console. otherwise, maybe the CSS is wrong and we would have to see the HTML / CSS for that. Link to comment Share on other sites More sharing options...
Chikwado Posted August 28, 2014 Author Share Posted August 28, 2014 Yes, I made my code like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>my external stylesheet page</title> <link rel="stylesheet" type="text/css" href="mystyle.css" media="all"> body{magin:0 auto; padding:0; width:100%; background:#000FFF;} </head> <body> <h1>external style test</h1> <p>very grateful for any help</p> </body> </html> And I saved it with extension .css, When I Click the browser to read it, It show only css properties and html text. Any help please. Link to comment Share on other sites More sharing options...
dsonesuk Posted August 28, 2014 Share Posted August 28, 2014 (edited) <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>my external stylesheet page</title> <link rel="stylesheet" type="text/css" href="mystyle.css" media="all"> body{magin:0 auto; padding:0; width:100%; background:#000FFF;} </head> <body> <h1>external style test</h1> <p>very grateful for any help</p> </body> </html>Err... You saved THIS with extension css? Then thats your problem.Save this as html without css styling, NOT CSS LINK, save css ONLY without style tag with css extension, the link to css file is made from html document by this.<link rel="stylesheet" type="text/css" href="mystyle.css" media="all"> Edited August 28, 2014 by dsonesuk 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