473,657 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The nowrap Property of TD Tags

I want to create TD tags with the nowrap property. I have a user control
which sets the Wrap property of a TableCell to False when dynamically
creating a table as follows:

cellCurrButton. Wrap = False

When the code is run, this creates a TD tag that looks like the following:

<td nowrap="nowrap" ></td>

However, when I edit the properties of a TD Tag created in Design, there is
a property called nowrap which when set to True creates a TD Tag that looks
like the following:

<td nowrap></td>

I prefer the second way because it is shorter and I also believe it is the
correct HTML. However, because the TableCell object does not have this
property, I cannot use it when creating generated TableCells. Why are these
two outputs so different? Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Nov 19 '05 #1
2 6644
The first is XHTML and second is HTML 4 compatible.

Cheers,
Steve Goodyear
Nov 19 '05 #2
On 5/20/05 20:49, in article uL************* *@TK2MSFTNGP09. phx.gbl, "Nathan
Sokalski" <nj********@hot mail.com> wrote:
I want to create TD tags with the nowrap property. I have a user control
which sets the Wrap property of a TableCell to False when dynamically
creating a table as follows:

cellCurrButton. Wrap = False

When the code is run, this creates a TD tag that looks like the following:

<td nowrap="nowrap" ></td>

However, when I edit the properties of a TD Tag created in Design, there is
a property called nowrap which when set to True creates a TD Tag that looks
like the following:

<td nowrap></td>

I prefer the second way because it is shorter and I also believe it is the
correct HTML. However, because the TableCell object does not have this
property, I cannot use it when creating generated TableCells. Why are these
two outputs so different? Thanks.


nowrap="nowrap" is better since it is compliant to modern standards like
XHTML. Standalone attributes are deprecated. In XHTML all attributes that
were previously standalone must have value equal to the attribute name.

VS 2003 is not XHTML compatible so Designer generates standalone attribute
which is OK for HTML 4. VS 2005 Designer always generates nowrap="nowrap"
since VS 2005 is XHTML compatible.

What you see at runtime is HTML generated by ASP.NET runtime. ASP.NET
controls try to generate XHTML whenever possible.

Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights

Nov 19 '05 #3

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

Similar topics

0
15186
by: Mark Moore | last post by:
I'm trying to layout a couple text input fields and their corresponding labels without using a table. When I was trying to debug my understanding of CSS, I was *very* surprised to see that span's with borders behave counter-intuitively (IMHO) when using style="white-space: nowrap;". Below is a fairly small chunk of XHTML that demonstrates what I'm talking about. What gives? -Mark
3
8830
by: Robert Cerny | last post by:
Hi everybody, I encounter the following layout problem in IE 6.0.28: Even on specifying "white-space: nowrap" and "overflow: hidden" the paragraph shoots out over the boundaries of the width restricted containing divison. See html document later. In Mozilla and Opera it looks fine.
2
3520
by: Brian K. Williams | last post by:
Does anyone know how to set the noWrap on a TableCell? TableCell oTableCell = new TableCell(); oTableCell. ???? = noWrap; Thanks in advance. -Brian K. Williams
3
1586
by: Kevin Lawrence | last post by:
Hi What should be used instead of nowrap in a table cell? VS2005 advises me to use a newer construct... Thanks Kev
1
6959
by: Katie | last post by:
Hi, I was wondering is there any way to change the width property of a table cell <Td id="test"to no wrap by using document.getElementById(test).SOMEMETHOD Thanks for your time and help :)
3
7515
by: dgoodmaniii | last post by:
Good day, all. I've been having this problem for a long time and it's finally driven me to abandon my own resources and get some help. I've been unable to find a similar problem discussed before on the list. Here's the url: http://gorpub.freeshell.org. The stylesheet is goretsty.css. For my questions, eliminate the </ul><ulin the middle of the <div class="toolbar">; I've only got that there as a stopgap to make the site appear at...
3
18988
by: Nathan Sokalski | last post by:
I am working on making my pages as xhtml compliant as possible (even though I am still using XHTML 1.0 Transitional). On the following page: http://www.w3schools.com/tags/tag_td.asp it says that XHTML 1.0 Strict no longer supports the td tag's nowrap="nowrap" attribute. I am assuming that this means there is some way to specify a nowrap using CSS. What would this be? Thanks. -- Nathan Sokalski
1
5759
pradeepjain
by: pradeepjain | last post by:
Hii guys i am using this menu for my site. http://www.cssplay.co.uk/menus/final_drop.html My problem is that when i have a text like "Contact us" for menu item it wraps around in IE but its fine in firefox .For primary item the link must not wrap and for secondary item if the link wraps its ok.I tried the css property white-space: no-wrap like this /* style the links for the top level */ #menubar a, #menubar a:visited {
0
3218
by: anand4160 | last post by:
i use nowrap="nowrap" attribuate to fix my UI for IE 6 , now when i am trying to run the same code in IE 8 its not working. The code is simple to display table. nowrap="nowrap" is written in the main CSS file , and its get applied to all site. its working fine with IE6 and 7 , but problem is in IE 8. In IE8 text in table <td /> displaying in one line and and crossing the window layout. Can any of you suggest me how to fix it?
0
8324
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,...
1
8516
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,...
0
8617
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
7353
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, 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...
0
5642
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
4173
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
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
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
1733
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.