code tags in this forum

johnm
avatar
rank Regular

Regular


Posts: 18
Joined: 2007-07-27

Can anyone tell me why when I use the code tags in this forum's form for posting html code it doesn't work?

Here's what I'm putting in:

(opening code tag here)
<div id="foo">
(closing code tag here)

Note that I'm escaping the left and right arrows to show this. But again what I'm putting in is:
left-arrow div id="foo" right-arrow ... content
left-arrow forward slash div right-arrow

Are div tags not allowed? Following I'll put in an unordered list using the code tags:

<ul>
<li>List Item 1</li>
<li>List Item 2</li>
<li>List Item 3</li>
</ul>

Is there something up with the 'preview trimmed version' versus the 'full preview'? Because I just noticed that when I hit preview it's showing both of them. In the trimmed version, the unordered list is broken along with any other html between the code tags, but in the full version it works. So what's going on with this?

John M.

Tyssen
Tyssen's picture
rank Moderator

Moderator


Posts: 6675
Joined: 2004-05-01
Location: Brisbane

<div id="foo"> Code tags

<div id="foo">

Code tags are <code>, not with [ and ]

How to get help
Post a link. If you can't post a link, post ALL your code, both HTML & CSS. No server-side code; just the code sent to the browser.
Use tags.
My articles | CSS Reference

johnm
johnm's picture
rank Regular

Regular


Posts: 18
Joined: 2007-07-27

using the wrong tags - fixed it

I guess you were right about my reading skills.

I totally misread the formatting instructions. I was looking at the section at the bottom where it was referring to the left-bracket code right-bracket tags for monospace formatting. I fixed it and of course it works now.

Now I'm curious to know how any of it worked at all? I did the <ul> above using the wrong tags as well.

Thanks!

John M.

Tyssen
Tyssen's picture
rank Moderator

Moderator


Posts: 6675
Joined: 2004-05-01
Location: Brisbane

Seems that the forum accepts

Seems that the forum accepts both but will only parse all tags correctly using the <code> kind.

How to get help
Post a link. If you can't post a link, post ALL your code, both HTML & CSS. No server-side code; just the code sent to the browser.
Use tags.
My articles | CSS Reference

Tyssen
Tyssen's picture
rank Moderator

Moderator


Posts: 6675
Joined: 2004-05-01
Location: Brisbane

Bumping this thread because

Bumping this thread because posting of code is still a recurrent problem on the forum. Is there any way we can add to the reply page a note that says something like: "when posting code, please use the third button from the right"? Because no-one knows it's there and there's too many threads that need to be edited to make them display right.

How to get help
Post a link. If you can't post a link, post ALL your code, both HTML & CSS. No server-side code; just the code sent to the browser.
Use tags.
My articles | CSS Reference

csscr
csscr's picture
rank Enthusiast

Enthusiast


Posts: 248
Joined: 2003-03-12

code

Hi Tyssen,
On the first line under the comment field:

Quote:
You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

So they can either hit the code button or read the guidelines below. I don't think adding it again will make anyone read.
I will add to my list of things to-do a note on accepting bbcode style code tags.

Tyssen
Tyssen's picture
rank Moderator

Moderator


Posts: 6675
Joined: 2004-05-01
Location: Brisbane

I'm not sure how many people

I'm not sure how many people read those. The problem is that there's a button to do the job but most people don't know it's there. Maybe you could change the image to say [enter code] ?

How to get help
Post a link. If you can't post a link, post ALL your code, both HTML & CSS. No server-side code; just the code sent to the browser.
Use tags.
My articles | CSS Reference

csscr
csscr's picture
rank Enthusiast

Enthusiast


Posts: 248
Joined: 2003-03-12

Sure that's a great idea,

Sure that's a great idea, would <code> be sufficient.

gary.turner
gary.turner's picture
rank Moderator

Moderator


Posts: 5848
Joined: 2004-06-25
Location: Dallas

That's the trouble with

That's the trouble with using icons. Somebody may have known that was a code icon. It weren't me, though. Smiling

cheers,

gary

A pianist who has learned the wrong system of fingering cannot become a virtuoso until he has laboriously taught himself the proper method.

My site is slo-o-owly being reconstructed; visit anyway.

Tony
Tony's picture
rank Moderator

Moderator


Posts: 2772
Joined: 2003-03-12
Location: Brisbane

icon changed

How's that?

Your question may have already been answered, search and read before you ask.

Hugo
Hugo's picture
rank Moderator

Moderator


Posts: 12314
Joined: 2004-06-06
Location: London

Not out!

Not out!

Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me