Topic: Pre, pre-wrap, etc... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21808" title="Pages that link to Topic: Pre, pre-wrap, etc... (Page 1 of 1)" rel="nofollow" >Topic: Pre, pre-wrap, etc... <span class="small">(Page 1 of 1)</span>\

 
Bmud
Bipolar (III) Inmate

From: Raleigh, NC
Insane since: Mar 2001

posted posted 05-15-2004 18:21

I want to use CSS:
white-space: pre-wrap;

It doesn't do anything. <pre> sucks because long lines don't get broken and it messes up my page.

Here's my link: http://www.osysi.net/projects/glass_box/index.php

So what's the secret? I've never figured this out.

Shine and shine. :: [old cell]

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 05-15-2004 20:11
quote:
It doesn't do anything.


In what browser?

code:
white-space: pre-wrap;

is new in CSS 2.1, and the browser support isn't very good. However,

code:
-o-pre-wrap

works in Opera 7 and

code:
-moz-pre-wrap

in newer versions of Mozilla. In IE, you can use

code:
pre { word-wrap: break-word; }

(which is proprietary code by the way.)

--
David

(Edited by HZR on 05-15-2004 20:11)

(Edited by HZR on 05-15-2004 20:17)

Bmud
Bipolar (III) Inmate

From: Raleigh, NC
Insane since: Mar 2001

posted posted 05-16-2004 17:53

So there is no easy way to do this.....

[edits]
This actually wasn't working either..

code:
pre {word-wrap: break-word;}


And on a side note, I was only testing for Internet explorer so far. It seems to be the least supportive as of right now anyway, so might as well keep on it.

But you at least know what I'm trying to do. I don't know why this wasn't made one of the original html tags in the first place, actually..

Shine and shine. :: [old cell]

(Edited by Bmud on 05-16-2004 17:57)

Bmud
Bipolar (III) Inmate

From: Raleigh, NC
Insane since: Mar 2001

posted posted 05-17-2004 03:27

And since I've already made a thread for this page, I just took a look at it from Opera. Oh man does it look bad. I read somewhere that Opera doesn't revert back to any other Doctype so it only shows you stuff the way the doctype is defined. Apparenty I'm not yet metting the XHTML standard. The guys on alistapart.com say "mixing ancient (tables) and modern (CSS)" is where problems arise most. Obviously, I'm using tables here. So as I'll be beating up the code and making test after test I'd also like to know what the 'standard' is these days for building tables if tables are too old. or are they? Either way opera isn't happy at the moment.

Shine and shine. :: [old cell]

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 05-18-2004 00:10
quote:
I read somewhere that Opera doesn't revert back to any other Doctype so it only shows you stuff the way the doctype is defined.

I can't make sense out of that. Are you talking about doctype switching?

quote:
Apparenty I'm not yet metting the XHTML standard.


Why would you?

quote:
The guys on alistapart.com say "mixing ancient (tables) and modern (CSS)" is where problems arise most.


The guys on alistapart says that? Oh, then it must be true. Seriously, I don't really know what they mean. Were they talking about layout?

quote:
I'd also like to know what the 'standard' is these days for building tables if tables are too old.


Still <table>. And no, it's not old.

And by the way, pre { word-wrap: break-word; } should work fine in IE (at least in IE6).

(Edited by HZR on 05-18-2004 00:11)

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 05-18-2004 02:43

To clarify: tables should be used to present tabular data. This is what they were designed to do. Just because using tables for layout is generally frowned on these days it doesn't mean that tables should not be used at all.

___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | Keeper of the Juicy Bits



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu