HighDots Forums  

How to display non-HTML line breaks

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss How to display non-HTML line breaks in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Ed Mullen
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-03-2008 , 02:56 PM






Bergamot wrote:
Quote:
Ed Mullen wrote:
Samuel Murray wrote:
I'm trying to use
HTML as an intermediary format to convert CSV to a word processing
format. But let me worry about that...
I'm confused and curious.

Me, too.

As for CSV conversion, what's the problem? I can open a .csv file in
Word 2000 directly

Why the OP wants to use HTML for this is a bit baffling.

Well, I'm glad it isn't just me.

--
Ed Mullen
http://edmullen.net
Are there seeing eye humans for blind dogs?


Reply With Quote
  #12  
Old   
Neredbojias
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-03-2008 , 09:23 PM






On 03 Sep 2008, Michael Wojcik <mwojcik (AT) newsguy (DOT) com> wrote:

Quote:
Neredbojias wrote:
On 02 Sep 2008, Samuel Murray <leuce (AT) absamail (DOT) co.za> wrote:

I'm trying to find out if there is a way (perhaps using CSS) to let
this code:

table><tr><td>One
Two
Three</td></tr></table

display the same as if the code would have been:

table><tr><td>One<br
Two<br
Three</td></tr></table

Look into the html <pre> attribute.

PRE> isn't an attribute; it's an element.
Oh yeah? What's its atomic number?

Quote:
A <PRE> block inside the <TD> is not the same as inserting <BR
elements. Some elements which may be children of <TD> may not be
children of <PRE>. User agents may, and often do, apply formatting
rules to text within a <PRE> block that they don't apply (under the
default styles) to text within <TD>, such as using a monospaced
typeface.

In short, this suggestion doesn't do what the OP asked for. Whether
it does what the OP *wants* is another question; and the OP might
have some success using <PRE> plus additional styling to render the
text in a more appropriate manner. (That assumes he doesn't need any
of the elements that <PRE> excludes, such as <IMG>, inline in his
TD>s.)

If Ben's suggestion of "white-space: pre-wrap" won't work, for
example, something like the following might provide the basic feature
with better styling under capable user agents and graceful
degredation under others:

td pre {
font-family: inherit;
white-space: pre-line;
}

table
tr><td><pre
One
Two
Three
/pre></td></tr
/table

"pre-line" seems to me closer to the OP's original request than Ben's
suggestion of "pre-wrap", since the former collapses whitespace.

Obviously the font styling might have to be changed, depending on how
TD> is styled. "font-family: inherit" works with FF2, but not with
IE7, so "font-family: serif" (or whatever) might be a better choice.

Unfortunately, none of the UAs I tried (FF2, IE7, oOO Writer 2.4)
appear to actually support "white-space: pre-line", so to get this to
render the way I think the OP wants it, you'd have to get rid of the
extra whitespace inside the <PRE> block.

But this combination does preserve the line breaks and it does
degrade gracefully; in particular, oOO Writer will preserve the line
breaks, which I gather the OP wanted. And the line breaks will be
preserved even if CSS is disabled or overridden, which is probably
desirable.
<sigh /> You've obviously put some thought into this, which is quite
laudible in some dimensions. However, if Jukka ever snuck into
dorayme's bedroom, you'd be the one result that wouldn't particularly
surprise me.

--
Neredbojias
http://www.neredbojias.org/ http://www.neredbojias.net/
Great Sights and Sounds
http://adult.neredbojias.org/ http://adult.neredbojias.net/ (adult)


Reply With Quote
  #13  
Old   
dorayme
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-03-2008 , 10:30 PM



In article <Xns9B0EBB0CCE109neredbojiasnano (AT) 194 (DOT) 177.96.78>,
Neredbojias <neredbojias (AT) gmail (DOT) com> wrote:

Quote:
You've obviously put some thought into this, which is quite
laudible in some dimensions. However, if Jukka ever snuck into
dorayme's bedroom, you'd be the one result that wouldn't particularly
surprise me.
There is a double counterfactual here and you have almost everything
about both the antecedents and the consequents wrong. That, of course,
is not surprising with your mangled neanderthalic methods of reasoning.

First, I do not have a bedroom. I am not that sort of being.

Second if I did and your Finnish mate wandered in, it would only be
because he had finally hunted down a disgusting coward or he had been
cunningly lured there bu my own team that is out hunting him down.

One thing for sure is that Interplan (the inter-planetary police force)
would soon be investigating a murder case.

--
dorayme


Reply With Quote
  #14  
Old   
Blinky the Shark
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-04-2008 , 12:10 AM



Neredbojias wrote:

Quote:
On 03 Sep 2008, Michael Wojcik <mwojcik (AT) newsguy (DOT) com> wrote:
PRE> isn't an attribute; it's an element.

Oh yeah? What's its atomic number?
It's one lower than that of postium.

And instant postium is an isotope.


Whoosh Prevention: http://jeffwerner.ca/2004/12/postum_coffee_s.html


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Need a new news feed? http://blinkynet.net/comp/newfeed.html



Reply With Quote
  #15  
Old   
Chris F.A. Johnson
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-04-2008 , 12:14 AM



On 2008-09-04, Blinky the Shark wrote:
Quote:
Neredbojias wrote:

On 03 Sep 2008, Michael Wojcik <mwojcik (AT) newsguy (DOT) com> wrote:
PRE> isn't an attribute; it's an element.

Oh yeah? What's its atomic number?

It's one lower than that of postium.
And much higher than top-postium!

Quote:
And instant postium is an isotope.
That's when a standards organization drinks too much (does that
explain OOXML?).

--
Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


Reply With Quote
  #16  
Old   
Blinky the Shark
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-04-2008 , 12:55 AM



Chris F.A. Johnson wrote:

Quote:
On 2008-09-04, Blinky the Shark wrote:
Neredbojias wrote:

On 03 Sep 2008, Michael Wojcik <mwojcik (AT) newsguy (DOT) com> wrote:
PRE> isn't an attribute; it's an element.

Oh yeah? What's its atomic number?

It's one lower than that of postium.

And much higher than top-postium!

And instant postium is an isotope.

That's when a standards organization drinks too much (does that
explain OOXML?).
"I'm a doctor, Jim, not an organization watcher."


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Need a new news feed? http://blinkynet.net/comp/newfeed.html



Reply With Quote
  #17  
Old   
Neredbojias
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-04-2008 , 02:36 AM



On 03 Sep 2008, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
In article <Xns9B0EBB0CCE109neredbojiasnano (AT) 194 (DOT) 177.96.78>,
Neredbojias <neredbojias (AT) gmail (DOT) com> wrote:

You've obviously put some thought into this, which is quite
laudible in some dimensions. However, if Jukka ever snuck into
dorayme's bedroom, you'd be the one result that wouldn't particularly
surprise me.

There is a double counterfactual here and you have almost everything
about both the antecedents and the consequents wrong. That, of course,
is not surprising with your mangled neanderthalic methods of reasoning.
Gee, thanks. That's a distinct improvement over the last evaluation you
gave my reasoning methods.

Quote:
First, I do not have a bedroom. I am not that sort of being.
Well, do you sleep in a barn with the other animals or something?

Quote:
Second if I did and your Finnish mate wandered in, it would only be
because he had finally hunted down a disgusting coward or he had been
cunningly lured there bu my own team that is out hunting him down.

One thing for sure is that Interplan (the inter-planetary police force)
would soon be investigating a murder case.
My "Finnish mate" would probably offer a strenuous objection to said
appellation, but honestly, I think he's already married. His missives
often effuse that ambience of feral frustration which not atypically comes
from a state of, uh, wedded bliss.

--
Neredbojias
http://www.neredbojias.org/ http://www.neredbojias.net/
Great Sights and Sounds
http://adult.neredbojias.org/ http://adult.neredbojias.net/ (adult)


Reply With Quote
  #18  
Old   
Neredbojias
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-04-2008 , 02:40 AM



On 03 Sep 2008, Blinky the Shark <no.spam (AT) box (DOT) invalid> wrote:

Quote:
Neredbojias wrote:

On 03 Sep 2008, Michael Wojcik <mwojcik (AT) newsguy (DOT) com> wrote:
PRE> isn't an attribute; it's an element.

Oh yeah? What's its atomic number?

It's one lower than that of postium.

And instant postium is an isotope.
Isotopic variation does not change an element but it could make it horny.

Quote:
Whoosh Prevention: http://jeffwerner.ca/2004/12/postum_coffee_s.html
Ahh, without caffeine it can't be worth a shit.

--
Neredbojias
http://www.neredbojias.org/ http://www.neredbojias.net/
Great Sights and Sounds
http://adult.neredbojias.org/ http://adult.neredbojias.net/ (adult)


Reply With Quote
  #19  
Old   
Blinky the Shark
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-04-2008 , 05:53 AM



Neredbojias wrote:

Quote:
On 03 Sep 2008, Blinky the Shark <no.spam (AT) box (DOT) invalid> wrote:

Neredbojias wrote:

On 03 Sep 2008, Michael Wojcik <mwojcik (AT) newsguy (DOT) com> wrote:
PRE> isn't an attribute; it's an element.

Oh yeah? What's its atomic number?

It's one lower than that of postium.

And instant postium is an isotope.

Isotopic variation does not change an element but it could make it horny.

Whoosh Prevention: http://jeffwerner.ca/2004/12/postum_coffee_s.html

Ahh, without caffeine it can't be worth a shit.
My best pal is a caffiene addict. He doesn't understand why I bother
drinking decaf cola. He just doesn't get, "Because I like the taste of
cola, and at 61 I'm young enough that I can stay awake without drugs."


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Need a new news feed? http://blinkynet.net/comp/newfeed.html



Reply With Quote
  #20  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: How to display non-HTML line breaks - 09-04-2008 , 11:58 AM



Blinky the Shark <no.spam (AT) box (DOT) invalid> writes:

Quote:
at 61 I'm young enough that I can stay awake without drugs."
Hell, I'm 39 and I can't do that...

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.