Jump to content

code box in java/css?


KingOfHeart

Recommended Posts

I'm not sure if it's possible or not but I'd figure I should ask.

 

I'm going to show some scripts in my tutorial. I need it to colorize certain words. Also I need it to display it by the amount of spaces and go to a new line when I press the enter key.

 

In HTML it removes extra spaces unless if I use   and it removes line breaks unless if I use <br>.

 

So what is possible?

Link to comment
https://forums.phpfreaks.com/topic/203035-code-box-in-javacss/
Share on other sites

Well thought of what I can do, but I forget the basic commands.

 

I'm going to use plain text, combined with a span tag to be used as tabs, span tag to color certain words, and create some kind of border around this whole area with a div tag.

 

So in a css file how would I draw a border?

A tab in my file is "1.5em;" but what do I need to put for span?

 

<div class = "code">

<span class = "blue">#include <<!>general></span><br>

 

How do I set up the css file names?

#div.code { < is this right?

#span.code.blue < what about this?

Link to comment
https://forums.phpfreaks.com/topic/203035-code-box-in-javacss/#findComment-1064464
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.