Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

using Textedit for css stylesheet

I am building a website with HTML and CSS using the Textedit. It appears that I cannot edit a css stylesheet in Textedit after the initial save. Is this true and how do I get around it? Making a new CSS stylesheet with every change is just not an option. Please help

mac pro, Mac OS X (10.6.1)

Posted on Nov 4, 2009 6:27 AM

Reply
Question marked as Best reply

Posted on Nov 4, 2009 6:39 AM

Download and try TextWrangler instead....

http://www.barebones.com/products/TextWrangler/
18 replies

Nov 17, 2009 1:00 PM in response to Royden Kading

Actually, the problem is the path. Your path is saying there is a sub-folder called "searchfiles" INSIDE the folder "files" and the css file is in there. What you want to go up out of the files folder into the seachfiles and consult the css file that is in the parent folder. To that you use the dots (as illustrated above in my example), so the link tag should read:

link rel="stylesheet" href="../lists.css"

This tells the browser "go one directory upwards and use the file lists.css"--I suspect you are confusing the syntaxes (if that is a word) of absolute and relative links, and how they work. You can see how things work on my page here:

http://www.pinkmutant.com/articles/snowleo1.html

Then select "View Source" from the View menu in Safari. The css file is actually here:

http://www.pinkmutant.com/mainb.css

And the image location is specified there, along with a bunch of other things, I could change the image used and formatting for all pages that use that style sheet by just editing the css file.

The only time I use type="text/css" is as a separate tag when I embed the css within the html page, and the W3C Validator doesn't seem to have a problem with that, and neither do any of the browsers I use.

If you want to validate your pages, take a look here:

http://validator.w3.org/#validateby_uri+withoptions

Sometimes the errors detected are useful for trouble-shooting your code.
Francine

User uploaded file
Francine
Schwieder

using Textedit for css stylesheet

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.