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

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

}

HTML
------

<a class = "TimeIndexThumbAnchor" style="color:#f5ac5d"

href="http://aa.usno.navy.mil/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 6878
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 = "TimeIndexThumbAnchor"
href="http://aa.usno.navy.mil/data/docs/RS_OneYear.html">
Sunrise&nbsp;and&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.*********@example.invalidwrote:
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.*********@example.invalidwrote:
>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#propdef-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 "specification" 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
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...
6
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...
0
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...
2
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...
19
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have <a href="javascript:somefunction()"what ... ?...
2
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...
23
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...
36
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...
14
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"...
4
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.