Jared Posted January 29, 2009 Report Share Posted January 29, 2009 I can't seem to figure out how to get CSS to work for my webpage. I did everything I saw in Stefan's video tutorial, and double checked my code, but my CSS file doesn't even have a proper icon like his for some reason, and my html code doesn't seem to recognize it. I've tried using notepad and wordpad to write the CSS code, and neither work. I'm trying to make links out of images, and although I got that part to work, I can't use CSS to position them properly on the page. Right now they are just going down the left hand side of the page. Also, I have a white border around all my images that spans the length of the page and I can't get rid of it. Can anyone help me with these issues? Any help would be much appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
LSW Posted January 29, 2009 Report Share Posted January 29, 2009 Posting your code linking it would help. But most often is: A) The Path to the file, if it is external, is wrong. When you saved it your program tacked on another ending. Notepad will save it as a text file, so myfile.css.txt. Click on it and rename it by deleting the .txt after saving it. Quote Link to comment Share on other sites More sharing options...
Jared Posted January 29, 2009 Author Report Share Posted January 29, 2009 (edited) Edited January 29, 2009 by Jared Quote Link to comment Share on other sites More sharing options...
JBall Posted January 29, 2009 Report Share Posted January 29, 2009 I named my CSS file HomePage.css, and it turned into a default icon with Cascading Style Sheet written out underneath my title with the .css file extension missing, but why would the icon not be the standard wordpad page icon? Because by changing the extension to .css, you changed the type of file it is. Fundamentally it no longer is a wordpad page. Quote Link to comment Share on other sites More sharing options...
JBall Posted January 29, 2009 Report Share Posted January 29, 2009 ...and... Is your style sheet in the same folder as your html? If not then your link path is wrong. Its also a good habit to only use lower case letters. (homepage.css instead of HomePage.css) But as long as that's consistent it shouldn't be causing your problem. Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted January 29, 2009 Report Share Posted January 29, 2009 What happens if you remove the tag and add your CSS into the head of the page between tags? Does it work properly there? Quote Link to comment Share on other sites More sharing options...
Wickham Posted January 29, 2009 Report Share Posted January 29, 2009 A common problem is that people save a file as say home.html or style.css and it doesn't work because it's actually been saved as home.html.txt or style.css.txt. Check in Windows Explorer with view Details to see if files have a .txt extension and remove it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.