tried to avoid using PRE in the page markup and instead used DIV
CLASS=foo and assigned the white-space pre property to it.
have some reports already that text is not showing as preformatted.
looks ok with mozilla 1.4 though. http://www.jerrysievers.com/Projects...&file=Makefile
comments please.
TIA
--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) Unix Administrator/Consultant
305 321-1144 (mobile http://www.JerrySievers.com/ 2 3391
Jerry Sievers <je***@jerrysie vers.com> wrote: tried to avoid using PRE in the page markup and instead used DIV CLASS=foo and assigned the white-space pre property to it.
Why? If the preformatted form of some text, i.e. the division into lines and
the use of spaces, is essential, why would you rely on CSS instead of
markup? And if it is not, why not let browsers reformat the text as they see
fit? There _are_ in-between cases, but I don't see much point in moving from
PRE to DIV, which _reduces_ the (quasi)semantic information involved.
have some reports already that text is not showing as preformatted.
Well, it surely isn't on any browser with CSS support disabled. The document http://www.blooberry.com/indexdot/cs...whitespace.htm
says that white-space: pre is supported by IE 5.5+ and Netscape 4+ and
Opera 4+, which means rather widespread support - but not universal (I'm
afraid IE 5.0 is still not dead).
Also note: "Conforming user agents may ignore the 'white-space' property in
author and user style sheets but must specify a value for it in the default
style sheet." http://www.w3.org/TR/REC-CSS2/text.h...ef-white-space
(The statement is obscure, and the sample style sheet in CSS2 spec does
_not_ specify a value. The statement has been removed in the CSS 2.1 draft.) http://www.jerrysievers.com/Projects...&file=Makefile
You seem to have some TAB (HT) characters there. Although HTML
specifications defines their meaning in PRE context, they also warn about
inconsistent implementations .
In CSS, the situation is even more obscure. The TAB character is defined as
a whitespace character, but its effect on rendering is not defined. (The
CSS 2.1 draft contains an attempt at a definition, which is basically the
same as in HTML.)
To conclude, I would suggest replacing TABs by spaces and using the PRE
markup, instead of CSS.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
i appreciate this info.
"Jukka K. Korpela" <jk******@cs.tu t.fi> writes: Jerry Sievers <je***@jerrysie vers.com> wrote:
tried to avoid using PRE in the page markup and instead used DIV CLASS=foo and assigned the white-space pre property to it. Why? If the preformatted form of some text, i.e. the division into lines and the use of spaces, is essential, why would you rely on CSS instead of markup? And if it is not, why not let browsers reformat the text as they see fit? There _are_ in-between cases, but I don't see much point in moving from
i think this is an in between case.
will fix the coding or files as needed to avoid the problem.
this is a basic content mgmt system in the works. the default file
type that is painted into the content part of the page is plain text
(historical reasons only).
seemed prudent to wrap the content window in <div class=pre> and then
jhust read the data in with php.
the minority of files are html with the header part cut away and body
tags replaced with a <div class=html>. was trying to avoid having php
need to determine the file type at run time. also didn't want to have
to edit the plain text files and put <code> or anything else in them.
highly dynamic system with static parts having all common layout
defined in a single set of m4 macro files.
<div class=pre>
php outputs file here...
</div>
so if file happense to have;
<div class=html>
doc body part here...
</div>
this new div just goes back into normal mode. only side effect is a
couple hard line breaks caused by the brief influence of the div with
pre property.
PRE to DIV, which _reduces_ the (quasi)semantic information involved.
have some reports already that text is not showing as preformatted.
Well, it surely isn't on any browser with CSS support disabled. The document
yeah! anyway; bottom line is that this approach that i tried isn't
reliable enough for general use (clever though as i might have thought
it was).
thanks for the response.
bye.
--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) Unix Administrator/Consultant
305 321-1144 (mobile http://www.JerrySievers.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Malcolm Dew-Jones |
last post by:
I am looking at xslt 1.0 and trying to understand if empty text nodes are
supposed to be stripped or not as the default behaviour.
3.4 starts by listing rules for when white space is not stripped and then
says "Otherwise the text node is stripped".
which appears to contradict a later paragraph that discusses the details
of the selection of nodes to be stripped ("Initially ... preserve ... all
element names").
|
by: Stanimir Stamenkov |
last post by:
Is it possible to make two inline elements to appear adjacent
stripping any white space appearing in between in the source?
Example:
<span class="adj">1</span>
<span class="adj">2</span>
<span class="adj">3</span>
--
|
by: Applebrown |
last post by:
Hello, basically, I'm just learning intermediate CSS and trying to convert
my old table webpage completely to CSS. Hoorah, right? Well, it's not quite
going as planned. It's an extremely simple layout, and I'm finding myself
stuck with small white space in between my images where I planned for the
graphics to be stacked up right on top of one another.
Here's the simple vertical layout: width is 640px, centered with a CSS
border. I'd...
|
by: Simon Dean |
last post by:
Hello!
Im looking to try and get into CSS for formatting my sites. Seems like a
nice premise, and should allow easier design for the future. But gees,
Im having a hard time of it.
I would like to create something like at http://www.blargle.co.uk or
http://www.celebrityresearcher.co.uk without the tables.
I figure should be easy, to have two DIV rows, 100% width, and then have
|
by: Xah Lee |
last post by:
sometimes i wish to add white space in <p> as to achived effects
similar to tab.
what should i do?
using empty image seems the sure way but rather complicated. (and
dosen't change size with font) Woudl some of the space character in
unicode work? (my html files uses unicode)
Xah
| |
by: shagy |
last post by:
Hi,
I'm having a problem with a <select><option> which has white space in
values...
When I post the data I only get the first word (up to the white space).
"Testing white space" becomes "Testing" after posting
code...
<select name="descr" id="descr">
|
by: Andreas Prilop |
last post by:
How many spaces should be displayed in
A <span style="display:none">x</span> B
between "A" and "B"? I notice that Mozilla displays one space
and Internet Explorer (5 & 6) displays two spaces. See
http://www.unics.uni-hannover.de/nhtcapri/temp/white-space.html
for a cumulative effect.
Why is this important? Instead of "span", think of the "rp" element
|
by: Brent |
last post by:
I want to paste a lengthly text document into a web page and have it
retain all of whitespace and line breaks.
I first tried the <pretag but that didn't work because it doesn't
wrap the text. I then moved to CSS and the white-space property, but I
can't seem to get it to work either. white-space: pre does the same as
<preand white-space: pre-wrap doesn't seem to be supported by any
browsers I've tested with. I tried word-wrap:...
|
by: asnowfall |
last post by:
If I have white space in the <atag, IE interpretes it as line break.
I tried setting "whie-space: pre" and it did not seem to affect.
Here is a sample.
-----------------------------------------------------
CSS
--------
.TimeIndexThumbAnchor
{
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |