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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.