KingOfHeart Posted May 27, 2010 Share Posted May 27, 2010 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? Quote Link to comment Share on other sites More sharing options...
haku Posted May 27, 2010 Share Posted May 27, 2010 You can wrap it in a <pre> tag to preserve your spaces. And you can use the PHP function nl2br() to convert line breaks to <br> tags. Quote Link to comment Share on other sites More sharing options...
KingOfHeart Posted May 27, 2010 Author Share Posted May 27, 2010 It's on a computer so I can't use php. So you can colorize pre areas? Quote Link to comment Share on other sites More sharing options...
KingOfHeart Posted May 28, 2010 Author Share Posted May 28, 2010 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.