Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dreamweaver css syntax highlighting within .php

Featured Replies

I have started using css with php and so my style.css is now style.php

 

Because of this dreamweaver doesn't highlight the syntax of the css within the style.php.

 

Is there a way to force dreamweaver to use a certain language syntax highlight for a specified file, so I can force dreamweaver to highlight css within this .php file. Better still is there a way to get it to highlight css and php?

 

If dreamweaver cannot do this does anyone know of any software that can do this that also supports code hinting, editing files directly on a server and opening multiple file in different tabs

 

Thanks

  • 8 months later...

Hey, were you able to find the answer to this? I'm also trying to figure out how to do syntax highlighting on a CSS file that includes some php and thus needs to have the .php extension.

I don't know of a correct way to do it, but you could cheat if you need the css to be highlighted the way dreamweaver does it. Wrap the entire code with <style>, this way both the css and the php will keep their syntax highlighting.

 

As it is a cheat way of doing it and it is just for an easy way to identify code, remember to remove the <style> tags once you have finished coding :)

  • 2 years later...

I know this post is old, but I found it on google while searching for an answer.

It seems I have found a much more comfortable way:

Simply add <?='/*'?><style><?='*/'?> before and <?='/*'?></style><?='*/'?> after your CSS and you will have your Syntax hightlighted while the Style-Tags are removed by PHP.

Edited by vincelord

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.