Re: [WSG] specifying width of pre
Yeah. I think it's kind of Gmail's fault. You'll note the mailing list signature isn't showing up on my messages, either. I'm sending this message in HTML format in the hope it stays more intact than plain text when the WSG list processes it... there's something seriously wrong with Gmail vs. WSG list, and I haven't had any problems sending to other non-WSG addresses, so... shrug. I emailed list admins last week about it but haven't heard anything. For the record, I can read my own messages fine in Ximian Evolution, but there's a string of funny characters at the end of the post as you said. Paul's blank reply thing seems... very odd. I haven't seen that at all. Anyway, if this message doesn't get through I'll stop using Gmail for WSG and start using local postfix to reply. If it does, and someone wants to help figure it out, please email me off list. I've got a bunch of Gmail invites here, so you can play with it first hand if you haven't already got an account. Regards, JoshOn 10/25/05, Rick Faaberg [EMAIL PROTECTED] wrote: On 10/24/05 10:31 PM Paul Noone [EMAIL PROTECTED] sent this out: Am I the only one getting blank replies from Joshua? I think there're a bunch of funny characters in his posts as I recently posted. Possibly some unicode thing-a-maroo? I can't read his messages. ** The discussion list forhttp://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfmfor some hints on posting to the list getting help **
RE: [WSG] specifying width of pre
From: Joshua Street Yeah. I think it's kind of Gmail's fault. You'll note the mailing list signature isn't showing up on my messages, either. I'm sending this message in HTML format in the hope it stays more intact than plain text when the WSG list processes it... Been through similar issues on another list, set the GMail encoding to Default (not UTF8). Then set it to Plain Text formatting (they recently added a Rich Text option). -- Peter Williams ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] specifying width of pre
codeprecontent/pre/code Gives you an alternate parent element which you can then set to scroll or whatever, preventing the content from spilling out across your layout generally. I think. On 10/24/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Is there any way to specify a max width for content of pre tags? Currently the content of my pre tags does not automatically wrap when the parent div is at an end - it just keeps on running until it finds the end of the line. I know the idea of the pre tag is to display the content as it is, but of course I want it to remain in the boundaries of my parent element. Any ideas? -- Joshua Street http://www.joahua.com/ +61 (0) 425 808 469
Re: [WSG] specifying width of pre
you think hmm, take a look at my content on http://www.mcville.net in a IE browser the content is sliding under the navigation bar LOL :) ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] specifying width of pre
Hi, The easiest way to define this is to create a division whose overflow attribute is set to auto. example: div style=overflow:auto;width=500px; pre whatever code you want /pre /div Hope it helps. Pat Boens http://www.fastwrite.com -Original Message- Is there any way to specify a max width for content of pre tags? Currently the content of my pre tags does not automatically wrap when the parent div is at an end - it just keeps on running until it finds the end of the line. I know the idea of the pre tag is to display the content as it is, but of course I want it to remain in the boundaries of my parent element. Any ideas? ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] specifying width of pre
(Yep. Or, if it's code -- I only really ever use pre for that -- as per my example previously, with the same styles.) On 10/25/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, The easiest way to define this is to create a division whose overflow attribute is set to auto. example: div style=overflow:auto;width=500px; pre whatever code you want /pre /div Hope it helps. Pat Boens http://www.fastwrite.com -Original Message- Is there any way to specify a max width for content of pre tags? Currently the content of my pre tags does not automatically wrap when the parent div is at an end - it just keeps on running until it finds the end of the line. I know the idea of the pre tag is to display the content as it is, but of course I want it to remain in the boundaries of my parent element. Any ideas? ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** -- Joshua Street http://www.joahua.com/ +61 (0) 425 808 469
RE: [WSG] specifying width of pre
Other than a scroll bar (overflow) there is no solution? The reason I need to use pre is that the content comes from a database that doesn't use HTML br's, but normal linebreaks. So to format the text correctly I need to put it in pre tags, but of course I want it to still fit into the rest of the content. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Street Sent: Monday, 24 October 2005 6:32 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] specifying width of pre codeprecontent/pre/code Gives you an alternate parent element which you can then set to scroll or whatever, preventing the content from spilling out across your layout generally. I think. On 10/24/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Is there any way to specify a max width for content of pre tags? Currently the content of my pre tags does not automatically wrap when the parent div is at an end - it just keeps on running until it finds the end of the line. I know the idea of the pre tag is to display the content as it is, but of course I want it to remain in the boundaries of my parent element. Any ideas? -- Joshua Street http://www.joahua.com/ +61 (0) 425 808 469 Nnvy jq♞z ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] specifying width of pre
http://www.joahua.com/random/pretest.html Play around with the web developer's toolbar in Firefox... I can't figure out a way to make it work as you want it to (though it's possible to style it so it doesn't look like preformatted text, demonstrated in the link). If it's coming from a database, isn't it trivial to use a regexp to replace \n with br /? (Or, doing things properly, wrapping paragraphs in paragraph tags?) It's also possible you could use Javascript to do that kind of stuff, but I'm afraid I'm of no help there. Josh On 10/25/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Other than a scroll bar (overflow) there is no solution? The reason I need to use pre is that the content comes from a database that doesn't use HTML br's, but normal linebreaks. So to format the text correctly I need to put it in pre tags, but of course I want it to still fit into the rest of the content. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Street Sent: Monday, 24 October 2005 6:32 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] specifying width of pre codeprecontent/pre/code Gives you an alternate parent element which you can then set to scroll or whatever, preventing the content from spilling out across your layout generally. I think. On 10/24/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Is there any way to specify a max width for content of pre tags? Currently the content of my pre tags does not automatically wrap when the parent div is at an end - it just keeps on running until it finds the end of the line. I know the idea of the pre tag is to display the content as it is, but of course I want it to remain in the boundaries of my parent element. Any ideas? -- Joshua Street http://www.joahua.com/ +61 (0) 425 808 469 Nnvy jq♞z ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** -- Joshua Street http://www.joahua.com/ +61 (0) 425 808 469
Re: [WSG] specifying width of pre
If I understand you correctly, you want pre with word-wrap? pre should only be used when the text you want to display is infact preformatted, such as indented code. Applying word-wrap to such text would be by definition to format it (and thus render in un-preformatted (sic)). If the text from the database is not actually preformatted beyond linebreaks, why don't you do a search and replace on the text from the database to format it properly. e.g. text_in_page = 'p' + replace(text_from_db, chr(13), '/pp') + '/p' ...or use 'br /' if a new paragraph is improper. Jachin Sheehy On 10/25/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Other than a scroll bar (overflow) there is no solution? The reason I need to use pre is that the content comes from a database that doesn't use HTML br's, but normal linebreaks. So to format the text correctly I need to put it in pre tags, but of course I want it to still fit into the rest of the content. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] specifying width of pre
If you're using PHP/mySQL then you could always write a simple function like below, or use PHP's built-in nl2br() function. //Clean-up function to remove BRs and whitespace from data wihtout hurting the HTML function nl2br_skip_html($string) { // remove any carriage returns (mysql) $string = str_replace(\r, '', $string); // replace any newlines that aren't preceded by a with a br / $string = preg_replace('/(?!)\n/', br /\n, $string); return $string; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Boehmer [Addictive Media] Sent: Tuesday, 25 October 2005 1:59 PM To: wsg@webstandardsgroup.org Subject: RE: [WSG] specifying width of pre Other than a scroll bar (overflow) there is no solution? The reason I need to use pre is that the content comes from a database that doesn't use HTML br's, but normal linebreaks. So to format the text correctly I need to put it in pre tags, but of course I want it to still fit into the rest of the content. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Street Sent: Monday, 24 October 2005 6:32 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] specifying width of pre codeprecontent/pre/code Gives you an alternate parent element which you can then set to scroll or whatever, preventing the content from spilling out across your layout generally. I think. On 10/24/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Is there any way to specify a max width for content of pre tags? Currently the content of my pre tags does not automatically wrap when the parent div is at an end - it just keeps on running until it finds the end of the line. I know the idea of the pre tag is to display the content as it is, but of course I want it to remain in the boundaries of my parent element. Any ideas? -- Joshua Street http://www.joahua.com/ +61 (0) 425 808 469 Nnvy jq♞z ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] specifying width of pre
On 25/10/05 1:59 PM, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Other than a scroll bar (overflow) there is no solution? The reason I need to use pre is that the content comes from a database that doesn't use HTML br's, but normal linebreaks. So to format the text correctly I need to put it in pre tags, but of course I want it to still fit into the rest of the content. Can you not use PHP to replace the line breaks with br / tags? I use something like this: ?php $br = chr(10); //single line feed character (LF) $description = str_replace(chr(10), br /\n); // etc ? You just need to verify which character your db is using for line breaks (MySQL?). Sorry to the list for straying off-topic, and apologies to Andreas (like the new site mate!) if I'm barking up the wrong tree. -- Kevin Futter Webmaster, St. Bernard's College http://www.sbc.melb.catholic.edu.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] specifying width of pre
Normally I would do that, but in this particular case I was hoping not to use server-side formatting of the content. But it seems I will have to revert to that. I have never had any use for the pre tag. Now I thought I finally had my chance and it turns out to be a really useless tag. DAMN! :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Futter Sent: Tuesday, 25 October 2005 2:33 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] specifying width of pre On 25/10/05 1:59 PM, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Other than a scroll bar (overflow) there is no solution? The reason I need to use pre is that the content comes from a database that doesn't use HTML br's, but normal linebreaks. So to format the text correctly I need to put it in pre tags, but of course I want it to still fit into the rest of the content. Can you not use PHP to replace the line breaks with br / tags? I use something like this: ?php $br = chr(10); //single line feed character (LF) $description = str_replace(chr(10), br /\n); // etc ? You just need to verify which character your db is using for line breaks (MySQL?). Sorry to the list for straying off-topic, and apologies to Andreas (like the new site mate!) if I'm barking up the wrong tree. -- Kevin Futter Webmaster, St. Bernard's College http://www.sbc.melb.catholic.edu.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] specifying width of pre
On 10/25/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Normally I would do that, but in this particular case I was hoping not to use server-side formatting of the content. But it seems I will have to revert to that. I have never had any use for the pre tag. Now I thought I finally had my chance and it turns out to be a really useless tag. DAMN! :) It's not _completely_ useless. Just mostly.
RE: [WSG] specifying width of pre
Am I the only one getting blank replies from Joshua? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Street Sent: Tuesday, 25 October 2005 3:06 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] specifying width of pre ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] specifying width of pre
On 10/24/05 10:06 PM Joshua Street [EMAIL PROTECTED] sent this out: On 10/25/05, Andreas Boehmer [Addictive Media] [EMAIL PROTECTED] wrote: Normally I would do that, but in this particular case I was hoping not to use server-side formatting of the content. But it seems I will have to revert to that. I have never had any use for the pre tag. Now I thought I finally had my chance and it turns out to be a really useless tag. DAMN! :) It's not _completely_ useless. Just mostly. ??U ?? b O¢°???wZ-?®?©??I???wZ-?®?©??¢???w¬??xb??¢p)¢??- ax b ?-¶)?¥? What's all them funny characters? ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] specifying width of pre
On 10/24/05 10:31 PM Paul Noone [EMAIL PROTECTED] sent this out: Am I the only one getting blank replies from Joshua? I think there're a bunch of funny characters in his posts as I recently posted. Possibly some unicode thing-a-maroo? I can't read his messages. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **