How do i show my code like this?

This is a discussion on "How do i show my code like this?" within the Web Page Design section. This forum, and the thread "How do i show my code like this? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 30th, 2007, 15:54
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,649
Thanks: 0
Thanked 8 Times in 8 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
How do i show my code like this?

I think this is a CSS matter, if not could a mod/admin move it please.

Anyway...I am looking for how to show my code like what it is on Karinnes website, mabey she could help! (Please)

Anyway, here is a link to it... LINK.

The thing i dont get is the numbers down the side.

Thanks
Marc
Reply With Quote

  #2 (permalink)  
Old May 30th, 2007, 15:58
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: How do i show my code like this?

Ordered list with css style. Pretty simple with a blog engine and forms.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #3 (permalink)  
Old May 30th, 2007, 16:21
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,649
Thanks: 0
Thanked 8 Times in 8 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: How do i show my code like this?

Thanks moojoo, but how do i do it.. lol :P
Reply With Quote
  #4 (permalink)  
Old May 30th, 2007, 17:13
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i show my code like this?

Just view the source, copy the code and play around with it.
Reply With Quote
  #5 (permalink)  
Old May 30th, 2007, 17:18
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i show my code like this?

Meh ... here's how I did it.

HTML
Code: Select all
<ol class="coding">
    <li><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"</code></li>
    <li class="tab1"><code>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</code></li>
    <li><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en-CA" xml:lang="EN-CA"&gt;</code></li>
    <li><code></code></li>
    <li><code>&lt;head&gt;</code></li>
    <li class="tab1"><code>&lt;title&gt;Some title&lt;/title&gt;</code></li>
    <li class="tab1"><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;</code></li>
    <li><code></code></li>
    <li class="tab1"><code>&lt;style type="text/css"&gt;</code></li>
    <li class="tab1"><code>html {</code></li>
    <li class="tab2"><code>background-color: #fff;</code></li>
    <li class="tab1"><code>}</code></li>
    <li class="tab1"><code></code></li>
    <li class="tab1"><code>body {</code></li>
    <li class="tab2"><code>color: #fff;</code></li>
    <li class="tab2"><code>margin: 0 auto;</code></li>
    <li class="tab2"><code>width: 780px;</code></li>
    <li class="tab2"><code>background-color: #900;</code></li>
    <li class="tab1"><code>}</code></li>
    <li class="tab1"><code>&lt;/style&gt;</code></li>	
    <li><code>&lt;/head&gt;</code></li>
    <li><code></code></li>
    <li><code>&lt;body&gt;</code></li>
    <li><code></code></li>
    <li><code>this site is centered</code></li>
    <li><code></code></li>
    <li><code>&lt;/body&gt;</code></li>
    <li><code>&lt;/html&gt;</code></li>
</ol>
CSS
Code: Select all
ol.coding {
	border: 1px solid #004545;
	padding: 3px;
	list-style-type: decimal-leading-zero;
	font-family: "Courier New", Courier, monospace;
}

ol.coding li.tab1 {
	padding-left: 5ex;
}
ol.coding li.tab2 {
	padding-left: 10ex;
}
ol.coding li.tab3 {
	padding-left: 15ex;
}

ol.coding li {
	background-color: #004545;
	margin: 5px 0 5px 30px;
}
Reply With Quote
  #6 (permalink)  
Old May 30th, 2007, 17:34
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,649
Thanks: 0
Thanked 8 Times in 8 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: How do i show my code like this?

Ok, thanks. I think i will just give it a miss (for the moment).

Thanks anyway.
Reply With Quote
Reply

Tags
code, code layout, layout

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
code behind code doesnt work skat ASP.NET Forum 4 Feb 18th, 2008 10:05
Can't get background to show casho Starting Out 17 Aug 14th, 2007 11:17
live search code and styleswitcher code hebel JavaScript Forum 0 May 12th, 2007 06:16
Can't get divs to show up on the right? Can someone scan over my code? KOinMotion Web Page Design 2 Nov 22nd, 2006 21:20
Can somebody give me the code to hide the source code? renren JavaScript Forum 7 Mar 7th, 2006 12:27


All times are GMT. The time now is 21:14.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43