473,396 Members | 1,725 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,396 software developers and data experts.

Is it possible to "just make spaces visible"?

Hello,

my problem is that spaces are always reduced to the size of one in html.
I need some trick to make all spaces in a line visible.

Something like this is possible with "<pre>" in HTML, but with this I
get my newlines twice as "<pre>" interprets newlines *and* "<br>" (and
no, in my case it's not easy to get rid of the "<br>").

Is something like this possible?

Thank you very much in advance

CU

Manuel
Mar 14 '06 #1
4 3932
Manuel Reimer wrote:
Hello,

my problem is that spaces are always reduced to the size of one in html.
I need some trick to make all spaces in a line visible.

Something like this is possible with "<pre>" in HTML, but with this I
get my newlines twice as "<pre>" interprets newlines *and* "<br>" (and
no, in my case it's not easy to get rid of the "<br>").

Is something like this possible?

Thank you very much in advance

CU

Manuel


Manuel,

In HTML, multiple consecutive spaces are compressed into one by default.
There are two ways to avoid this:
- Avoid multiple consecutive spaces by using the &nbsp; character
entity reference, e.g. I want to leave lots &nbsp; &nbsp; &nbsp; of
space in here.
- Alter the default behavior with CSS, by specifying white-space. See
http://www.w3.org/TR/CSS21/text.html...ef-white-space. Some options
may not work on all browsers; you'll have to do some testing.

Chris Beall

Mar 14 '06 #2
Manuel Reimer wrote:
my problem is that spaces are always reduced to the size of one in html.
I need some trick to make all spaces in a line visible.


Why? Are you trying to line up columns of data? That is the job of a table.
Do you want to indent text? That is the job of text-indent, margin and
padding.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Mar 14 '06 #3
Manuel Reimer wrote:
Hello,

my problem is that spaces are always reduced to the size of one in html.
I need some trick to make all spaces in a line visible.

Something like this is possible with "<pre>" in HTML, but with this I
get my newlines twice as "<pre>" interprets newlines *and* "<br>" (and
no, in my case it's not easy to get rid of the "<br>").


Then get rid of the newlines. Or change the spaces to non-breaking spaces.
Mar 15 '06 #4
Tue, 14 Mar 2006 23:45:03 +0100 from Manuel Reimer
<Ma***************@nurfuerspam.de>:
Hello,

my problem is that spaces are always reduced to the size of one in html.
I need some trick to make all spaces in a line visible.

Something like this is possible with "<pre>" in HTML, but with this I
get my newlines twice as "<pre>" interprets newlines *and* "<br>" (and
no, in my case it's not easy to get rid of the "<br>").


<pre>
Line 1
Line 2
Line 3</pre>

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Mar 15 '06 #5

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

Similar topics

6
by: Matt | last post by:
I was wondering if someone could explain why I'm receiving this error. It's like a 404 error but I think it might be something else. Basically, I have a page where a user inputs his email...
2
by: \Dandy\ Randy | last post by:
Hello everyone. I have been following misc posts, as well as reading several FAQ's on this issue, unfortunatley I cannot locate a solution. I am hoping that someone will be able to provide me with...
19
by: Martin Oddman | last post by:
Hi, I have a compiling problem. Please take a look at the code below. I have an application that is built upon three tiers: one data tier (Foo.DataManager), one business tier (Foo.Kernel) and...
2
by: john | last post by:
I have some controls that I want to be invisible, but if the user does something, they will become visible using javascript. So I can't set its "visible" property to false, because then they won't...
0
by: Michael Fitzpatrick | last post by:
I have a .NET application with an installer. The customer wants the install page with the "Everyone" or "Just Me" selection to default to "Everyone". Presently it defaults to "Just Me". Any hints...
4
by: Ronald S. Cook | last post by:
I created an MSI install for a Windows app I wrote. When installing, however, it defaults to install for "Just Me" instead of "Eveveryone" (meaning anyone who uses this computer). I would like...
1
by: ImageAnalyst | last post by:
Yay!!! They fixed this for VS2005. You can now set the default installation to be "Everyone" instead of "Just Me" and you can control whether you even want those radio button installed in your...
0
by: bird lazy | last post by:
Hi all, One more stupid question. I developed a class library -- how can I use it in MSA? It can't ref it. Is it possible at all??? Thanks. --
6
by: gdjoshua | last post by:
New to C##.. All I want to do is add spaces to a string I'm displaying in label? Anybody know the easiest way to do this. char(32) doesn't seem to be working...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
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,...

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.