Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

this is my first ever question here.

Basically I have a dynamic CSS file, meaning the PHP changes the colours of borders and stuff depending on the preferences saved in database. My problem is not code related but software related and that's why I think it deserves to be posted here over everywhere else.

My PHP file is all CSS, and the header sets the content type to text/css. Dreamweaver however, doesn't recognise the CSS, and prints it as straight text. No code highlighting, no auto-completion, the features I love and use dreamweaver for.

Can I force dreamweaver to use other syntax highlighting, for when PHP is outputting for other scenarios like mine?

Thanks!

share|improve this question
    
I solved my own issue! I used a dirty hack to fool dreamweaver into thinking it was producing CSS in the PHP file. This is what I did, for all those trying to solve the issue too. <?php header("Content-type: text/css"); if(true==false):?> <style> <?php endif; ?> @import url(http://fonts.googleapis.com/css?family=Alegreya); body { margin:0px; width:100%; height:100%; background-color:#222; –  v01d3k4 Mar 18 '13 at 14:36

1 Answer 1

This is how I do it, and it is better since it is easier to write and it doesn't use the php code that makes no sense.

<?php header("Content-type: text/css"); ?> 
/* <style> /* notice that this entire line is a comment in CSS */
@import url(http://fonts.googleapis.com/css?family=Alegreya); 
body { margin:0px; width:100%; height:100%; background-color:#222;
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.