11 replies [Last post]
Desdinova
Desdinova's picture
Offline
Enthusiast
Last seen: 1 year 34 weeks ago
Timezone: GMT+1
Joined: 2006-03-28
Posts: 341
Points: 4

Don't know if someone brought it up yet, but it would be really nice if the code tags could get a whitespace: pre;
I understand some may go to wide, so I suggest setting a fixed width and overflow auto, as long as I can copy all the html without the structure being lost it's fine by me.

furthermore, can you increase the margin or padding between paragraphs?

As a rule, I never touch anything more sophisticated and delicate than myself

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 43 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9150
Points: 3134

Good suggestion

I'm with you on that one, Desdi. You can use the [code] tags, but that means you have to strip and replace the < delimiters. It's a PITA, but I do like to maintain formatting.

I haven't tried nesting the tags, but will, like so: [code]<code>...</code>[/code]

//edit: well, that's a non-starter. bah!

cheers,

gary

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 29 weeks 2 days ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

kk5st wrote: I haven't tried

kk5st wrote:

I haven't tried nesting the tags, but will, like so: [code]<code>...</code>[/code]

//edit: well, that's a non-starter. bah!

cheers,

gary
Been there, tried that , could have told you it was a non-starter Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 43 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9150
Points: 3134

A big help, Hugo is

Hugo wrote:
kk5st wrote:

I haven't tried nesting the tags, but will, like so: [code]<code>...</code>[/code]

//edit: well, that's a non-starter. bah!

cheers,

gary
Been there, tried that , could have told you it was a non-starter Smile

But you didn't, did you? Sad $@$#dirty bracklefratz!!!&^@#$

cheers,

gary

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

csscr
csscr's picture
Offline
Enthusiast
Last seen: 20 hours 46 min ago
Timezone: GMT+10
Joined: 2003-03-12
Posts: 124
Points: 53

white-space

Hi Guy's,
I have added white-space:pre to code.
Here's a test:



Let me know if it is screwing up anything.

Tony

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 43 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9150
Points: 3134

<ul id="nav"> <li> <a

Sorry, Tony. I had it formatted this way:
<code>
<ul id="nav">
  <li> <a href="#" >first Level menu</a>
    <ul>
      <li><a href="#" >second Level menu</a></li>
      <li><a href="#" >second Level menu</a>
        <ul>
          <li><a href="#" >third Level menu</a></li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
</code>

cheers,

gary

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 43 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9150
Points: 3134

Went huntin', found this

Went huntin', found this (reformatted to my tastes:)):

code, .code, pre {
    color:#069; 
    background-color:#FCFCFC;
    border:solid 1px #CCC;
    font-size:1.3em; 
    display:block; 
    margin:5px 0 5px 5px; 
    padding:5px 0 5px 5px;
    overflow: auto;}
	
code {
    max-height:400px; 
    overflow:auto;}

Where'd you put it?

I did this to good effect:

code, .code, pre {
    white-space: pre;
    color:#069; 
    background-color:#FCFCFC;
    border:solid 1px #CCC;
    font-size:1.3em; 
    display:block; 
    margin:5px 0 5px 5px; 
    padding:5px 0 5px 5px;
    overflow: auto;}
	
code {
    max-height:400px; 
    overflow:auto;}

Hmmm, was I running on a cached style.css?

cheers,

gary

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

csscr
csscr's picture
Offline
Enthusiast
Last seen: 20 hours 46 min ago
Timezone: GMT+10
Joined: 2003-03-12
Posts: 124
Points: 53

Hi Gary, It took me a couple

Hi Gary,
It took me a couple of times refreshing my test post before I saw anything change. Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 29 weeks 2 days ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

Quote: Hmmm, was I running

Quote:

Hmmm, was I running on a cached style.css?

cheers,

gary

Been there, done that. Could have told you you were running on a cached copy Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 43 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9150
Points: 3134

csscr wrote:Hi Gary, It took

csscr wrote:
Hi Gary,
It took me a couple of times refreshing my test post before I saw anything change. Smile

OK, that did it. Seems I jumped the gun.

Boy! Desdi had a good idea. Smile

cheers,

gary

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 43 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9150
Points: 3134

Hugo wrote:Quote: Hmmm, was

Hugo wrote:
Quote:

Hmmm, was I running on a cached style.css?

cheers,

gary

Been there, done that. Could have told you you were running on a cached copy Smile
Hmmm, let me look at my notes … Ah, here we are;

I mean it now and I meant it then when I wrote:
But you didn't, did you? Sad $@$#dirty bracklefratz!!!&^@#$

cheers, Laughing out loud

gary

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

Desdinova
Desdinova's picture
Offline
Enthusiast
Last seen: 1 year 34 weeks ago
Timezone: GMT+1
Joined: 2006-03-28
Posts: 341
Points: 4

hehe heeyyy nice!

hehe heeyyy nice!

As a rule, I never touch anything more sophisticated and delicate than myself