You are here: Re: Konqueror and Padding « HTML « IT news, forums, messages
Re: Konqueror and Padding

Posted by Jonathan N. Little on 09/28/07 14:20

Blinky the Shark wrote:
<snip>

> <pre>
> <code>
>

One could say that the use of PRE to format multiline code snippet is
presentational and not semantic, like B, I, BIG & SMALL... Personally
what I do is just create a class for larger multiline code snippets.

code.bigSnippet {
display: block; margin: .5em 1em; padding: .5em;
border: 1px solid #ccf; white-space: pre;
}


<code class="bigSnippet">unsigned int findprime(vector<unsigned int>
prime, unsigned int target)
// Finds the Nth prime number in a sequence
// # if the prime vector already has the target, return it,
// # else find it and fill up vector with results.
{
unsigned int x = prime.back()+1;
while( target != prime.size() )
//while we have not gotten to the target
{
if (isprime(prime, x) )
{prime.push_back( x);}
x++;
}

return prime[target-1];
</code>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация