Formatting posts - how can I indent?
-
This is a formatting question, not a programming question! I was trying to post some pseudo-code on a programming forum, and I can not work out how to indent the different levels of the code. Spaces are shown when creating the message, but not in preview or once it is posted. This is not just for text marked as CODE - even if you try to indent a list, any leading spaces at the start of each line are discarded for display (but if you edit the post, the indenting is still there!) For example: Bottom level First indent (should have 4 leading spaces) Second indent (should have 8 leading spaces) I don't see anything in the posting FAQs to cover this - maybe it should be with the "Formatting" tags. Any suggestions?
-
This is a formatting question, not a programming question! I was trying to post some pseudo-code on a programming forum, and I can not work out how to indent the different levels of the code. Spaces are shown when creating the message, but not in preview or once it is posted. This is not just for text marked as CODE - even if you try to indent a list, any leading spaces at the start of each line are discarded for display (but if you edit the post, the indenting is still there!) For example: Bottom level First indent (should have 4 leading spaces) Second indent (should have 8 leading spaces) I don't see anything in the posting FAQs to cover this - maybe it should be with the "Formatting" tags. Any suggestions?
This board uses HTML so you're seeing an artifact of how HTML works - consecutive spaces are collapsed into one space when rendered. Use the
<pre>
tag to override this:4 space indent 6 space indent
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD
-
This is a formatting question, not a programming question! I was trying to post some pseudo-code on a programming forum, and I can not work out how to indent the different levels of the code. Spaces are shown when creating the message, but not in preview or once it is posted. This is not just for text marked as CODE - even if you try to indent a list, any leading spaces at the start of each line are discarded for display (but if you edit the post, the indenting is still there!) For example: Bottom level First indent (should have 4 leading spaces) Second indent (should have 8 leading spaces) I don't see anything in the posting FAQs to cover this - maybe it should be with the "Formatting" tags. Any suggestions?
If you do not want to use <pre> tags as Mike suggested, then you can use for each space 4 spaces 8 spaces
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04 "There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05 Within you lies the power for good - Use it!
-
This board uses HTML so you're seeing an artifact of how HTML works - consecutive spaces are collapsed into one space when rendered. Use the
<pre>
tag to override this:4 space indent 6 space indent
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD
Works only on IE. Doesn't work on FF - FF shows your pre snippet with zero indentation, Mike. For FF, use pre tags and then use for space
-
Works only on IE. Doesn't work on FF - FF shows your pre snippet with zero indentation, Mike. For FF, use pre tags and then use for space
I remember this came up a few weeks ago, isn't that caused by a bug in the CSS that the forum uses? --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD
-
This is a formatting question, not a programming question! I was trying to post some pseudo-code on a programming forum, and I can not work out how to indent the different levels of the code. Spaces are shown when creating the message, but not in preview or once it is posted. This is not just for text marked as CODE - even if you try to indent a list, any leading spaces at the start of each line are discarded for display (but if you edit the post, the indenting is still there!) For example: Bottom level First indent (should have 4 leading spaces) Second indent (should have 8 leading spaces) I don't see anything in the posting FAQs to cover this - maybe it should be with the "Formatting" tags. Any suggestions?
-
I remember this came up a few weeks ago, isn't that caused by a bug in the CSS that the forum uses? --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD
Michael Dunn wrote: I remember this came up a few weeks ago, isn't that caused by a bug in the CSS that the forum uses? Possibly - since I am sure FF renders pre tags correctly in normal cases.
-
I remember this came up a few weeks ago, isn't that caused by a bug in the CSS that the forum uses? --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD
Not the CSS - the HTML. CP has an unclosed font tag at the beginning of each message, and because of how FireFox deals with unclosed tags, and the styles in place on that specific tag, it breaks the behavior of <pre> in messages.
Ave Shog9, CP-addicti te salutant! - K(arl), The Soapbox
-
Works only on IE. Doesn't work on FF - FF shows your pre snippet with zero indentation, Mike. For FF, use pre tags and then use for space
Firefox breaks because CP puts an unclosed <font> tag in the messages. To work around this, you can put a closing tag in yourself. So,
this
indentation
works
in
firefox!My god, you're a genius! - Jörgen Sigvardsson, The Lounge
-
Firefox breaks because CP puts an unclosed <font> tag in the messages. To work around this, you can put a closing tag in yourself. So,
this
indentation
works
in
firefox!My god, you're a genius! - Jörgen Sigvardsson, The Lounge
That's sweet X| You could go the standard IT route and have your script automatically add it in as a workaround... :laugh:
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
Firefox breaks because CP puts an unclosed <font> tag in the messages. To work around this, you can put a closing tag in yourself. So,
this
indentation
works
in
firefox!My god, you're a genius! - Jörgen Sigvardsson, The Lounge
This has been fixed. I know - I will do penance this weekend for my deriliction. cheers, Chris Maunder
-
This has been fixed. I know - I will do penance this weekend for my deriliction. cheers, Chris Maunder
Chris Maunder wrote: This has been fixed. :)
Ave Shog9, CP-addicti te salutant! - K(arl), The Soapbox
-
This has been fixed. I know - I will do penance this weekend for my deriliction. cheers, Chris Maunder
Chris Maunder wrote: I know - I will do penance this weekend for my deriliction. We only expect you to be chained to the servers during the week. :-D And no sneaking away to watch the tour.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon