January 9, 201115 yr Hi!! This is my first post here. I'm coding a site in html/ css and found that my css stylesheet does not apply to my html. Does anyone know what could be wrong here? I checked my html and it is all valid without errors or missing (closing) tags. Attached is a snip of my html. Thanks for your help. html pic.tiff
January 9, 201115 yr Try using relative paths rather than absolute paths. This will also help when you want to move the website around.
January 10, 201115 yr Author Thanks guys....I tried both the above options but still nothing happens...any suggestions? Thanks
January 10, 201115 yr Where in relation to your html file is your css file are the both in the same folder, are they in there own folders
January 10, 201115 yr Author Again, attached is a snip of my html. I added some basic styling in the stylesheet but nothing happens.....not sure what I am doing wrong here...... test.tiff
January 10, 201115 yr Author Thanks...well, index.html and style.css are both in the same folder and I'm using relative paths..
January 10, 201115 yr Author No sorry, no link yet, I'm doing this on my my computer. It should work I assumed.....but it doesn't
January 10, 201115 yr Author You mean: <?xml version="1.0" encoding="utf-8"?> that was included automatically by BBedit... should I remove that? (I'm sorry if you consider that a stupid question but I'm learning..;-))
January 10, 201115 yr if the files are indeed in the same files, then it's a spelling issue, double check the spelling and file ending of the css file.
January 10, 201115 yr Author Thanks...tried all of that and it still does not work...what to do now?!
January 10, 201115 yr Author Thanks for your help so far.... I uploaded my raw html file to my site: www.leonfassbender.com You may check the html with firebug.... I just can't get it styled, not even with the easiest of CSS rules... (this is my first attempt ever writing html from scratch but I haven't found any errors. All the links and images are broken but that shouldn't matter for some simple CCS styling).
January 10, 201115 yr Author I have now and it seems to work...... then why would it not work when previewing in in a browser?? This is very strange..
January 10, 201115 yr Are you using the same browser to view on line as locally, you haven't got styles disabled in one of your browsers, did you have both files in the same folder di you refresh your browser after making the changes I don't know mate but glad you got it working
January 10, 201115 yr Author Thanks man! Really appreciate your time and help! Can go to bed peacefully now! Thanks again cheers!
Create an account or sign in to comment