Community
    • Login

    How to display CSS style on a PHP page?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 1.8k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jonathan NichJ Offline
      Jonathan Nich
      last edited by

      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.

      EkopalypseE PeterJonesP 2 Replies Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @Jonathan Nich
        last edited by

        @Jonathan-Nich

        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.

        1 Reply Last reply Reply Quote 1
        • andrecool-68A Offline
          andrecool-68
          last edited by

          In such cases, I constantly switch the language syntax, and to make it more convenient, I duplicated it in the context menu

          Безымянный.png

          1 Reply Last reply Reply Quote 2
          • PeterJonesP Online
            PeterJones @Jonathan Nich
            last edited by PeterJones

            @Jonathan-Nich ,

            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 the contextMenu docs 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.

            1 Reply Last reply Reply Quote 3

            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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors