On the topic of commenting styles, I use the following:

<!-- [header + logo -->
<div id="header">
        ...
</div>
<!-- header] -->

So the id of the element is right next to a opening or closing square
bracket indicating if it's a start or end of the block.

Works well for us.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Kirkwood|Motive
Sent: Friday, 4 November 2005 3:53 p.m.
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Help needed with IE drama...

Hi Darren,

I haven't reviewed the bug, however if its anything like the issue we've
come across with comments [1] then you could try an alternative method
of commenting the code. (This goes somewhat to the concept of semantic
markup also.)

Rather than:

<!-- begin footer -->
<div id="footer">
   ...
</div>
<!-- end footer -->

try:

<div id="footer">
   ...
<!-- end footer --></div>

Rationale: The id attribute identifies the nature of the <div> (as a
result of taking a semantic approach to assigning the id value there is
no need 'duplicate' this information in the comment). It is more
problematic to keep track of the end of the <div>, and so a comment is
useful. Placing the end comment inside the </div> avoids the issue with
floats and comments.

Admittedly, it took me a while to get used to the new coding convention,
but the judicious use of white space helps.

[1] Bug caused by floats and comments: <
http://www.positioniseverything.net/explorer/dup-characters.html >

>We've worked out that the issue was caused by the comments in the HTML
>file.  Has anyone had this sort of issue before?  If there a solution
>other then removing the comments?

Best regards,

-- 
Andy Kirkwood | Creative Director

Motive | web.design.integrity
http://www.motive.co.nz
ph: (04) 3 800 800  fx: (04) 970 9693
mob: 021 369 693
93 Rintoul St, Newtown
PO Box 7150, Wellington South, New Zealand
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to