10 replies [Last post]
johnm
Offline
Regular
Last seen: 7 years 19 weeks ago
Timezone: GMT-4
Joined: 2007-07-27
Posts: 18
Points: 0

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
Offline
Moderator
Brisbane
Last seen: 9 weeks 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

<div id="foo"> Code tags

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

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

johnm
Offline
Regular
Last seen: 7 years 19 weeks ago
Timezone: GMT-4
Joined: 2007-07-27
Posts: 18
Points: 0

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
Offline
Moderator
Brisbane
Last seen: 9 weeks 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

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, jsFiddle it.
My blog | My older articles | CSS Reference

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 9 weeks 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

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, jsFiddle it.
My blog | My older articles | CSS Reference

csscr
csscr's picture
Offline
Enthusiast
Last seen: 13 weeks 2 days ago
Timezone: GMT+10
Joined: 2003-03-12
Posts: 124
Points: 53

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
Offline
Moderator
Brisbane
Last seen: 9 weeks 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

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, jsFiddle it.
My blog | My older articles | CSS Reference

csscr
csscr's picture
Offline
Enthusiast
Last seen: 13 weeks 2 days ago
Timezone: GMT+10
Joined: 2003-03-12
Posts: 124
Points: 53

Sure that's a great idea,

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

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 8 hours 19 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9273
Points: 3279

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. Smile

cheers,

gary

UI design should be egoless; if you succumb to the temptation to show off, you’re probably doing it wrong. (from ESR)

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

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 hours 42 sec ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5150
Points: 2748

icon changed

How's that?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 days 18 hours ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Not out!

Not out!

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