![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
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 |
#2
| |||
| |||
|
|
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 uploaded the file if anyone cares to look http://home.swipnet.se/virtpub/lang/cpp/lessons/ |
|
border-style: solid solid solid solid; border-width: thin thin thin thin; Can be shortened to: |
#3
| |||
| |||
|
|
adrian suri schreef: 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 uploaded the file if anyone cares to look http://home.swipnet.se/virtpub/lang/cpp/lessons/ You only specified the padding on the left side, do something like this: padding: 5px 10px 10px 2px to specify the padding on the top, right, bottom and left. BTW: code like: border-style: solid solid solid solid; border-width: thin thin thin thin; Can be shortened to: border-style: solid; border-width: thin; Or eben better: border: thin solid black; Cheers. |
![]() |
| Thread Tools | |
| Display Modes | |
| |