iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > In The Know > How is this done?

Reply
 
LinkBack Thread Tools
Old September 22nd, 2008, 12:11 PM   #1
WebForumz Member
 

Join Date: Apr 2007
Location: Notts, England
Posts: 55
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Altering Power: 0 motlive is on a distinguished road
Closing Tag Class

Hi All, been a long time for me so hope everyone is well..

anyone able to offer any advice on this.

A while a go i created a website using a lot of divs, and got pretty lost in them after a while, so I started adding the class/id to the closing tag..

So what would be:

HTML Code:
<div id="wrapper>
<h1> Welcome</h1>
<p>Lorem Ipsum Likes to party</p>
<div id="right">
<ul>
<li>Hooray for CSS</li>
<li>Boo to IE</li>
</ul>
</div>
<div class="content">
<p>CSS is wicked bad, yeahhh bouuuyyyyy</p>
<p>Just another random line</p
</div>
</div>
became:

HTML Code:
<div id="wrapper>
<h1> Welcome</h1>
<p>Lorem Ipsum Likes to party</p>
<div id="right">
<ul>
<li>Hooray for CSS</li>
<li>Boo to IE</li>
</ul>
</div id="right">
<div class="content">
<p>CSS is wicked bad, yeahhh bouuuyyyyy</p>
<p>Just another random line</p
</div class="content">
</div id="wrapper">
Now I cant find any clear guide lines on this!!! I doubt its good practice but just wonder what people thought on it as it makes tracking the divs a lot easier.. well for me at least

Last edited by motlive; September 22nd, 2008 at 12:19 PM..
motlive is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 22nd, 2008, 12:15 PM   #2
Most Reputable Member
 

Join Date: May 2007
Location: Cornwall, England
Posts: 1,421
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Rep Altering Power: 0 Jack Franklin will become famous soon enough
Re: Closing Tag Class

What I do is this:

HTML Code:
<div id="a">
<div id="b">
<div id="c">
content and stuff
<!--end div c--></div><!--end div c-->
<!--end div b--></div><!--end div b-->
<!--end div a--></div><!--end div a-->
Because using the HTML comments is better I think. But I don't know if your way is bad or not, interesting point.
__________________
Yours is the Earth and everything that's in it
And - which is more - you'll be a Man my son!
Jack Franklin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 22nd, 2008, 12:22 PM   #3
WebForumz Member
 

Join Date: Apr 2007
Location: Notts, England
Posts: 55
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Altering Power: 0 motlive is on a distinguished road
Re: Closing Tag Class

Agree Franklin, I comment as below

HTML Code:
<!-- Wrapper -->
<div id="wrapper><!-- Logo -->
<h1> Welcome</h1><!-- End Logo -->
<p>Lorem Ipsum Likes to party</p>
<!-- Right Panel -->
<div id="right">
<ul>
<li>Hooray for CSS</li>
<li>Boo to IE</li>
</ul>
</div><!-- End Right Panel --><!-- Content -->
<div class="content">
<p>CSS is wicked bad, yeahhh bouuuyyyyy</p>
<p>Just another random line</p
</div><!-- End Content -->
</div><!-- End Wrapper -->
but sometimes when im cutting and pasting divs around, especially closing ones I miss out the closing comment.
motlive is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 22nd, 2008, 12:59 PM   #4
Reputable Member
 

Join Date: Apr 2008
Location: Or-Yehuda, Israel
Age: 61
Posts: 281
Thanks: 0
Thanked 26 Times in 24 Posts
Rep Altering Power: 0 shalom_m is on a distinguished road
Re: Closing Tag Class

I use comments on my </div>s too.
It saved my many hours in debugging.
shalom_m is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 24th, 2008, 09:01 AM   #5
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
Re: Closing Tag Class

I would stick with HTML comments, or even better, indented mark-up (or an editor with a block level expand/contract tool )

I would avoid using any attributes on closing tags - I very much doubt it is valid syntax.
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 25th, 2008, 07:05 PM   #6
New Member
 

Join Date: Sep 2008
Location: unitedstates
Age: 22
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 pandreson is on a distinguished road
Re: Closing Tag Class

I'll walk through the code the same way the JVM does running the two programs. The code is similar to the minimal example program in Lucene, it just works on a bigger text corpus. the optimization method of Index Writer is called and the index is then closed. The program then terminates.
-------------------------------------
pandreson

Last edited by Aso; September 26th, 2008 at 07:05 AM.. Reason: No sig
pandreson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 12th, 2008, 11:54 AM   #7
New Member
SuperMember
 
Electric Studio's Avatar
 

Join Date: Feb 2008
Location: Oxford, UK
Age: 39
Posts: 44
Thanks: 0
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 Electric Studio is on a distinguished road
Re: Closing Tag Class

Please note that you can only use one similar ID tag on each page for validation. So if you intend to re-use your CSS on multiple elements, use "class" rather than "id".
__________________
Electric Studio
Recent work include: Sarahs Flowers | 22GT Racing
Electric Studio is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble closing gaps Phixon HTML, XHTML and CSS 2 September 17th, 2007 11:00 AM
Closing a browser without a popup.. JustinStudios JavaScript 3 March 23rd, 2007 09:31 PM
closing an application kal JavaScript 4 December 13th, 2005 10:20 AM
closing a window. Hatsu JavaScript 11 November 30th, 2003 04:41 PM


Search Engine Optimization by vBSEO 3.2.0 RC8