473,770 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"white-space: pre-wrap" is not working for <a> tag

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
--------
.TimeIndexThumb Anchor
{
text-decoration: none;
padding: 0px;
border-style:none;
height: 1px;
width: 1px;
white-space: pre-wrap ;

}

HTML
------

<a class = "TimeIndexThumb Anchor" style="color:#f 5ac5d"

href="http://aa.usno.navy.mi l/data/docs/RS_OneYear.html ">
Sunrise and Sunset </a>

Output Rendered by IE
-------------------------------
Sunrise
and
Sunset
I would like to see "Sunrise and Sunset" in sameline.
-------------------------------------------------------------

Please help me..

Thanks
Ramesh

Nov 5 '06 #1
4 6899
as*******@gmail .com wrote:
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.
white-space: pre-wrap ;
pre-wrap is an invalid value. Paste your CSS here and see:
http://www.htmlhelp.com/tools/csscheck/
I would like to see "Sunrise and Sunset" in sameline.
<a class = "TimeIndexThumb Anchor"
href="http://aa.usno.navy.mi l/data/docs/RS_OneYear.html ">
Sunrise&nbsp;an d&nbsp;Sunset </a>

What is the width of the area in which you are using this link? How
about a URL to the page?

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 5 '06 #2
Beauregard T. Shagnasty <a.*********@ex ample.invalidwr ote:
pre-wrap is an invalid value. Paste your CSS here and see:
No, "pre-wrap" is perfectly valid. Just read the CSS specification:
<http://www.w3.org/TR/CSS21/text.html#white-space-prop>

The problem is that only a few browsers do support this special value.
And IE doesn't support this value (like many other parts of the web
standards).

--
Alexander
Nov 5 '06 #3
Alexander Clauss wrote:
Beauregard T. Shagnasty <a.*********@ex ample.invalidwr ote:
>pre-wrap is an invalid value. Paste your CSS here and see:

No, "pre-wrap" is perfectly valid. Just read the CSS specification:
<http://www.w3.org/TR/CSS21/text.html#white-space-prop>
Sorry, I was going by the link supplied by the mentioned CSS check page,
which is:
<http://www.w3.org/TR/REC-CSS2/text.html#propd ef-white-space>

Yes, this is CSS2, and not CSS21 ...
The problem is that only a few browsers do support this special value.
And IE doesn't support this value (like many other parts of the web
standards).
Exactly.

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 5 '06 #4
Scripsit Alexander Clauss:
No, "pre-wrap" is perfectly valid. Just read the CSS specification:
http://www.w3.org/TR/CSS21/text.html#white-space-prop
You are referring to a "specificat ion" that describes itself as a "working
draft" and adds:

"This is a draft document and may be updated, replaced or obsoleted by other
documents at any time. It is inappropriate to cite this document as other
than work in progress."

Thus, the word "valid" (with our without an attribute like "perfectly" ) is
particularly loose, if not meaningless, here.
The problem is that only a few browsers do support this special value.
Well, that's a good practical point. The simple way to suggest that line
breaks be prevented inside an element is white-space: nowrap. If the element
contains, say, just two normal words with one space between them, you could
also change the space to no-break space, preventing a line break even when
CSS is off.

It's impossible to see whether this would satisfy the OP's needs, since the
description of the situation was vague and odd. What's the point in the
trailing space in the element content, and why on &Planet; would anyone try
to set the width and height of a text link to one pixel.

The odds are that we cannot help the OP to create the problem he wants to
create before he gives us more details.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Nov 5 '06 #5

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

Similar topics

5
2800
by: Eric A. Forgy | last post by:
Hello, I am just learning Java and am trying to write a method that does something like //=========================================== public Static List find(double array,double val,String relationalOp) { List list = new ArrayList();
6
13099
by: Matt Adams | last post by:
I want define for a couple of words inside a longer text with different font specifications. I declared it like: ....text before.... <FONT class=aaa> these text should get other attributes </FONT> text after However when I let this html source validate the FONT tag is marked as not compatible with XHTML. So how do I specify otherwise new font attributes to only a few words?
0
1029
by: Dave | last post by:
In a VB.NET application, I have a datagrid that I export to an Excel spreadsheet like this: ' Set the content type to Excel Response.ContentType = "application/vnd.ms-excel" Dim tw As New System.IO.StringWriter Dim hw As New System.Web.UI.HtmlTextWriter(tw) ' Get the HTML for the control.
2
2961
by: yer darn tootin | last post by:
Here's the scenario: I have a javascript function taking the contents of a datalist ( content from a SQL db ) and opening it in a new window to allow the user to print. The pop-up window successfully applies the formatting from the datalist ( ie the dl's <ItemStyle> properties ), but ignores any of the formatting 'hard coded' into the SQL data being returned, eg things like <div class="newpara">. This in-table formatting appears OK on the...
19
2880
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have <a href="javascript:somefunction()"what ... ? ----------------------------------------------------------------------- Whatever the rest of your question, this is generally a very bad use of the javascript pseudo protocol. It was designed so that a function could return a new page. For example: `` javascript:"<p>Hello</p>" ''. Using it simply to...
2
7651
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but don't have any luck is to do a form validation. This script requires the files: db-file-to-disk.asp and _upload.asp. There is a DESCRIPTION field in the db-file-to-disk.asp file, what I want to do is the user has to field out this fied before...
23
2993
by: Stanimir Stamenkov | last post by:
I want to find out whether the following usage of the "Bookmark" link type is o.k. An example could be seen at <http://www.geocities.com/stanio/more/horoskop.html>. The text is in Bulgarian and is some kind of entertaining poetical horoscope. I've used <LINK rel="Bookmark"to create a meta-TOC for the document. Reading the definition of the "Bookmark" link type in the HTML spec I haven't actually got if I'm using it correctly. ...
36
5115
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT do so, since this is not part of the specification. How then to you apply styles to entire columns? Surely you don't have to write <td class="behold"on every row item.
14
75533
by: white lightning | last post by:
How to have <select onchange="this.form.submit()"and also a Submit button on one form? I have something like this: <form action="<?php $_SERVER; ?>" method="post" enctype="multipart/form-data" name="form1"> <select onchange="this.form.submit();" name="prod"> <option value="">Select product</option> <option value="12">abc</option>
4
2907
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field is not a null value. I am not using any code behind (C#) to bind the data or manipulate the data. I have read that when there is a null value in the database that there is no record in the "dataset". Can anyone show me how to bind a value in the...
0
10260
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, 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...
0
10102
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9910
tracyyun
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...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
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...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.