Forum

> > Off Topic > Code Box
Forums overviewOff Topic overviewLog in to reply

English Code Box

7 replies
To the start Previous 1 Next To the start

old Code Box

Avo
User Off Offline

Quote
We all know code tag on US.de.
Many sites with programming lessons have specially designed boxes with code.

I'm just interested, how is it possible to make? I would make similar thing in HTML - code box(or hope it's possible with CSS or PHP). For example when I use:

<codebox title="Code:">
     <line>Line 1</line>
     <line>Line 2</line>
     <line>Another line</line>
</codebox>

there'll appear

1
2
3
Line 1 
Line 2
Another line

with numeration, of course. Can anyone help me?
edited 1×, last 10.03.13 12:09:03 am

old Re: Code Box

Infinite Rain
Reviewer Off Offline

Quote
I think that you can't create such a thing in HTML, but in PHP.

Correct me if I'm wrong.

old Re: Code Box

Alistaire
User Off Offline

Quote
user Infinite Rain has written
I think that you can't create such a thing in HTML, but in PHP.

Correct me if I'm wrong.


CSS more like it.

old Re: Code Box

mafia_man
User Off Offline

Quote
I have done this using HTML, CSS and JavaScript + jQuery. It's not done properly tho.

• Preview •
index.html >
style.css >
edited 1×, last 10.03.13 12:31:24 am

old Re: Code Box

Avo
User Off Offline

Quote
I'm newbie in CSS, but after short time I achieved:
HTML+CSS >

what gives:

That's a pity I can't get the same, but with numeration.
EDIT: Thank you, mafia_man. Pie and cookies for you. Looks good.
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview