How to display CSS style on a PHP page?
-
Hi.
I have a PHP page that’s full of CSS and I’m wanting to open the PHP page, yet have the style be CSS so I can read the CSS easily.
How to do this?
Thanks.
-
To my knowledge, there is no lexer that contains PHP and CSS.
What you can try is something I have posted here.
But I don’t know if this is sufficient in your case. -
In such cases, I constantly switch the language syntax, and to make it more convenient, I duplicated it in the context menu

-
If you want to use @andrecool-68’s suggestion of adding the lexers to the context menu: in case it wasn’t clear, the arrow wasn’t meant to indicate that opening the Languages menu will give the popup in the screenshot – rather, he modified his right-click ContextMenu to include a Syntax Language folder which allows changing to his favorite list of languges. See this discussion, where we delve more deeply into how @andrecool-68 made that folder in the context menu. To make the edits, you will use Settings > Edit Popup ContextMenu to change the settings in
contextMenu.xml. See thecontextMenudocs here for more on the syntax.Alternately, you could set up a script similar to the ones described in this other thread. The post I linked contains a script which toggles between XML and HTML, which could be quickly adapted to work with CSS and PHP. Throughout the thread, there are also examples of using a macro to just set the language instead of toggling, and other similar concepts.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login