Solved

HTML Syntax not the same

Posted on 2004-09-29
10
212 Views
Last Modified: 2012-05-05
Hi team, I developed a html table in Dreamweaer Mx v7, and cut and pasted the code into a c# web form. The forms displays as coded but the html for a td bordercolour value is not valid, visual studio tell me that this is not a vaild element. Why is this? How can two modern applications have different html properties?

Cheers

Wayne Atherton
0
Comment
Question by:watherton
  • 5
  • 3
  • 2
10 Comments
 
LVL 5

Expert Comment

by:stumpy1
ID: 12179773
I think it may be a difference in the spellings, VS uses the american spelling of BorderColour!!! See below for example - Its <TD bordercolor as opposed to <TD bordercolour

<TABLE id="Table1" borderColor="aqua" cellSpacing="1" cellPadding="1" width="300" border="1">
      <TR>
            <TD bordercolor="#ffcc00"></TD>
            <TD bordercolor="#6699cc"></TD>
            <TD bordercolor="#ff0000"></TD>
      </TR>
</TABLE>
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12179789
BTY, I havent used Dreamweaver Mx v7 so im guessing that it spells it as bordercolour as opposed to VS spelling it as bordercolor
0
 

Author Comment

by:watherton
ID: 12180067
stumpy1, on the html view in vs a press space bar to get the list of available tags i can use within my td and border is not there.

i have align,valign,hieght,width,bgcolor, plus all the others, but no border colour.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 33

Accepted Solution

by:
raterus earned 50 total points
ID: 12180304
border-color is a css element, you'll have to implement this via stylesheets

<td style="border-color: red; border-width: 1px; border-style: solid;"></td>
0
 

Author Comment

by:watherton
ID: 12180400
Excellent, thank you sir/miss
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12180430
I am using visual studio 2003 enterprise architect edition. In html view, when I type '<table ' i get a drop downlist with 40 or 50 properties + methods listed, bordercolour is the 3rd in this list.
also when I type '<td ' i get a list of 40 or 50 properties and methods, bordercolor is the 4th in this list.

Ive also used the style="border-color:..." in association with stylesheets as raterus suggests, its a much better and more extensibly implementation.
0
 
LVL 33

Expert Comment

by:raterus
ID: 12180515
interesting stumpy, when I try that the intellisense only lists valid html attributes (around 10).
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12180785
Ive tried it with different bordercolor and it works for me. The code I posted above is a direct copy and paste from my aspx page and the table and cells each have different border colours!!

Seems very strange.  Im on VS 2003 EA with .Net Framework 1.1 on W2K SP4
0
 
LVL 33

Expert Comment

by:raterus
ID: 12181003
going by the W3C's standard, <td bordercolor="#FFCC00"></td> is not valid html (nor do I think it ever has been).

Browsers like to stretch the rules a bit though (for designers who don't know better), which is why it probably works.  Now if you are saying visual studio's intellisense is allowing you to create that attribute, then that would be a problem...
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12181163
Yip, VS intellisense alows me to create the attribute.

I think I figured out what the story is, watherton stated that they pasted html code into a webform (.aspx page). In the html behind the webform, intellisense allows bordercolor as an attribute, along with 40 or 50 other methods and properties. This is probably because the .Net aspx parser will interpret and translate this as needed.

However if I create an ordinary HTML page (.htm) then intellisense only gives me the following options for the <table
align
bgcolor
border
cellpadding
cellspacing
height
id
runat
width

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question