Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I once read you could force the color of visited links in Safari by adding a:visited { color: #6611cc !important; } in the .css file under Preferences < Advanced. In this way, it will turn every link you've clicked on purple and by so override the actual web design.

I like the idea but I tried to do so, but TextEdit or Word won't allow me to save the file. It wants to add .rtf, .webdesign or other extensions behind the .css.
How can I force to add this to the .css file?

share|improve this question
1  
I know this doesn’t directly answer your question, but if you’re familiar with the command line, you could use nano, ed or vi to edit and save the file. These binaries are all bundled with OS X. –  Mathias Bynens Apr 30 '12 at 7:46

3 Answers 3

Save the file then select the file in the Finder. With the file selected in Finder, Choose Get Info (Command - I).

In the Name & Extenstion section, rename the file to visited.css. It will likely as if you want to change the extension from something like .rft to .css, click OK and your done. Move the file to wherever you want and select it from within Safari.

share|improve this answer
2  
If the file was saved with an RTF extension, it probably contains RTF formatting codes, and therefore wouldn't work properly as a CSS file, even if you rename it. –  benzado Apr 30 '12 at 8:09
    
In TextEdit you should be able to save it as type text (.txt). There shouldn't be any formatting codes in that. Delete any that you find. If you need a free code editor try Text Wrangler from the makers of BBEdit. You can get it from the app store. –  afragen Apr 30 '12 at 20:30

Although it doesn't directly answer your question, personally, I would use something like Textwrangler (free) instead, which is much better suited for jobs like this.

A general-purpose text editor for light-duty composition, data-file editing (where the data files consist of plain [unstyled] text), and manipulation of text-oriented data.

You won't run into any of the issues you described (including the fact that rtf is formatted text and what you want is plain text - although you can switch to plain text in TextEdit) and you can name the file whatever you wish. You'll also get syntax highlighting which helps too.

enter image description here

share|improve this answer
    
+1 TextWrangler is great! –  benzado Apr 30 '12 at 8:14

First, use TextEdit, don't use Word.

Before you save your document, select Make Plain Text from the Format menu. (If the menu says Make Rich Text then you are already in plain text mode.)

If you save the document now, you should be able to give it whatever extension you want. Since the file is plain text, you can be sure that TextEdit won't add any additional formatting instructions that will turn it into an incorrectly-formatted CSS file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.