Hi
tried code but since I am using lots of these to highlight etc key words
it mucks up, anyway
I got it working using
pre.samplecode
{
border-style: solid solid solid solid;
border-width: thin thin thin thin;
float: left;
visibility: visible;
height: auto;
background-color: white;
font-family: monospace;
position: relative;
padding-left: 2pt;
width: 50em;
Font-style: normal;
Border-color: black;
}
the problem now is I wanted the text to wrap around this this, which it does
but I can't gt padding to give some space between, I upload the file if
anyone cares to look
http://home.swipnet.se/virtpub/lang/cpp/lessons/
look for this middle of the page
//File name: cstring.cpp
// example code using c string ie an array of char
// By Adrian Suri 2005-06-20 15.21.29
#include Iostream
using namespace std;
#include<cstring>// included for string manipulation functions
#include<cstdlib>// includes clear screen, exit functions etc
int main() {
const int arrSize=30; //constant can't be changed
charfirstName[arrSize];
char lastName[arrSize]; // set up arr of char for full name
char country[arrSize];
adrian
Alan J. Flavell wrote:
On Wed, 17 Aug 2005, Michael Stemper wrote:
I'd think that sample code would be better placed in a <CODE> element
than in a <PRE> element.
Maybe I'll provoke some hefty counterblast for this, but if it's the
kind of code that's conventionally presented in a fixed format, I
wouln't be shy to mark it up with <pre> *and* <code>.