473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

CSS, standards compliance, PRE and word-wrap

Hi there,

I've created a series of layouts designed to be optimized for search
engines, and yet also standards-compliant.

The problem isn't in the layouts themselves, but in the display of the
code.

I use the <pre> tags to ensure that the code, as well as all of the tag
formatting, gets transported.

The problem is that pre, by default, doesn't wrap words. I've got a
solution in place that's cross-browser compatible, but unfortunately
the W3 validator doesn't like it.

To see what I mean, click here:

http://www.searchenginefriendlylayou...footer_23.html

The pre areas are the ones in the content area with the black border
and the light grey background. That's how I want them to appear, but
again, the W3 validator presents errors:

http://jigsaw.w3.org/css-validator/v...der_footer.css

As you can see, the only errors are those related to the word-wrap.
Everything else is fine.

Any ideas on how I can accomplish both of my goals? (Standards
compliance and pre word-wrapping?)

Thanks.

Feb 21 '06 #1
2 5925
Hi, I found this useful.

http://cheeaun.phoenity.com/weblog/2...d-content.html

white-space:pre-wrap is a valid css2.1 property.....but the w3c
validator checks for css2 (.0) compliance by default

Guess you already know the other white-space values are browser
specific, remove them if 100% standards compiance is important to you

Apparently word-wrap is planned for a text effects module in css3 but
is IE only at present ( You're future standards compliant! )

In the meantime, will white-space:normal give you the word-wrapping you
need?

Feb 21 '06 #2
No, it won't. That's part of the problem. It inherits the default
property for its element, from what I can gather. In the case of PRE,
that means it just runs allllllllllllllllllllllllllllllllll the way
along the page and stretches it out and makes it look just silly.

If worse comes to worst, I can always put the stylesheet into my code
as a separate stylesheet rather than as an import and show how the
other ones validate. I'd just really prefer not to have to do that.

Thanks.

Feb 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

162
by: Isaac Grover | last post by:
Hi everyone, Just out of curiosity I recently pointed one of my hand-typed pages at the W3 Validator, and my hand-typed code was just ripped to shreds. Then I pointed some major sites...
3
by: CJM | last post by:
On company in our group is looking at getting their rather basic website redeveloped externally. In typical fashion, they have declared that this project it 'marketing-led' rather than 'IT-led',...
3
by: Jules | last post by:
So with MS looking towards Longhorn Indigo messaging, for Service based Applications Integration, its brief dalience with adoption of industry wide Web Service standards is over. This is a major...
9
by: christopher diggins | last post by:
I would like some feedback if the follow code is standard compliant, and are there any obvious redundancies or inefficiencies? The purpose of the code is to emulate the behaviour of a struct FuBar...
2
by: John Doe | last post by:
I have a webpage which shows and hides divs as a method of navigation. It works great in the ever evil IE. It works not so great (read not at all) in any standards compliant browser. I haven't...
23
by: Mario T. Lanza | last post by:
I have been authoring web sites for several years now and recently come to value web standards (as touted by Zeldman and many other web gurus). I have noticed with frustration that there are so...
22
by: Roy Schestowitz | last post by:
Paul Thurrott: "Wilson's (IE Lead Program Manager) post is disappointing because Microsoft doesn't plan to fully support the latest CSS standard in IE 7.0..." ...
100
by: Roose | last post by:
Just to make a tangential point here, in case anyone new to C doesn't understand what all these flame wars are about. Shorthand title: "My boss would fire me if I wrote 100% ANSI C code" We...
115
by: junky_fellow | last post by:
What is a C object ? If i have some function "func()" in my C program, then can i say that "func()" is a C object ? or if i have some function pointer (ptr) which contains the address of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.