Solved

HTML Syntax not the same

Posted on 2004-09-29
10
210 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASCX file or a newer alternative? 1 34
Need help with building query string 2 19
Where did System.Data.Objects go? 2 23
Winform Module - What is the ASP.Net equiv 2 19
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now