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

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********@hotmail.com
http://www.nathansokalski.com/
Nov 19 '05 #1
2 6628
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********@hotmail.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
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...
3
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...
2
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
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
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
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...
3
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...
1
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.