Is it a sin that I have used this much indentations, spaces and comments in my source codes?
Posted: Thu, 2008-06-19 09:01
Is it a sin that I have used this much indentations, spaces and comments in my source codes for both the html and CSS part?
http://virtualseafarer.com/witch/ndiswrapper/index.html#
http://virtualseafarer.com/witch/ndiswrapper/css/ndis_00.css
http://virtualseafarer.com/witch/ndiswrapper/css/tutorial_base.css


Moderator
Posts: 5624
Joined: 2005-02-22
Not at all. Personally, I
Posted: Thu, 2008-06-19 10:14
Not at all. Personally, I think you've gone overboard with your multi-line section comments in the HTML, but the idea is fine. Indentation and comments make page maintenance much (much much ... much) easier. For me, the longer you do this and the more you have to alter work you've done previously (or that others have done), the more you will start organising your code so its clear what is happening where.
For me, in html I try to manage indenting so each nested element is indented a similar amount. When closing a major page element, I'll add a comment to say what that element is (e.g. </div><!-- #sidebar -->). In CSS, I will use whole line comments to break the CSS up into sections and explain what each section is.
On Having Layout | The One True Layout | menus by listamatic
Regular
Posts: 38
Joined: 2007-04-16
Chris..S wrote:Not at all.
Posted: Thu, 2008-06-19 11:23
My middle name is Overboard
Capitan Overboard.
Enthusiast
Posts: 63
Joined: 2008-02-09
Location: Bristol
Looks good to me, I really
Posted: Thu, 2008-06-26 23:42
Looks good to me, I really hate it when I have to look/edit other people code and its all on a couple lines
I tend to code like this...
<body> <div id="wrapper"> <h1>blah</h1> <p>blah blah</p> </div> <!-- END WRAPPER --> </body>#wrapper { width:960px; margin:0 auto; }I think the key is to find a style you like and stick to it
p.s I also think the multi-line comments are overboard
edit - Also I can only see as far down as your 8th menu item and my screen is not tiny...
"If a man is trying to hang himself from the tree in my yard but the knot keeps slipping and allowing him to fall before it kills him do you expect someone to go out and teach him to tie a better knot?" - Triumph
Enthusiast
Posts: 90
Joined: 2007-04-22
Location: USA
I think it looks clean, to
Posted: Thu, 2008-07-10 02:20
I think it looks clean, to each their own, so long as you are the main person making edits and updates. I do tend to keep mine organized thought by indenting each nested element with the divs.
Moderator
Posts: 5698
Joined: 2004-06-25
Location: Dallas
Like the others, I think
Posted: Thu, 2008-07-10 04:34
Like the others, I think you're on the right path. I'd like to see you tweak a couple of things.
For examples, see the source at gtwebdev and the css.
Not everyone agrees with these formatting rules, but what do they know?
cheers,
gary
A pianist who has learned the wrong system of fingering cannot become a virtuoso until he has laboriously taught himself the proper method.
My site is slo-o-owly being reconstructed; visit anyway.
Regular
Posts: 38
Joined: 2007-04-16
Holy cow that's a lot to
Posted: Sat, 2008-07-12 07:21
Holy cow that's a lot to think about, I'll try to assimilate as time goes on. Tnx for the tips!