Code cleaned !

L_Plates

Fledgling Freddie
Joined
Dec 22, 2003
Messages
628
Im sure some of you have seen my site before and remember the code was a mess :(

Well.... I have cleaned it up a wee bit and applied alot more CSS to make it easier to keep running.

The site use to have around 80 images to make the layout !! it now has 1 :) So you can get the idea of how powerful CSS can be.

http://www.webinventions.co.uk

All comments welcomed.
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
well done, although your poll is broke

looks better than the old one...
 

fatbusinessman

Fledgling Freddie
Joined
Dec 22, 2003
Messages
810
Ok, first off (so that I don't get berated too much for this post) that's a very nice site, and I like it.

However, I can think of a number of ways in which you could (in my opinion) improve it, certainly from the point of view of generating simpler, more readable and more maintainable code.
  • While it is of course entirely your decision, and while the method that you've got works fine, I would advise against the way you've implemented the layout. From a quick skim through your code, I've noticed that you've not just got tables within tables, but tables within tables within tables within tables within tables within tables (that's six levels of table-nesting). While cutting out table layouts altogether would probably be an excessive amount of work for the benefit it would get you, I would suggest reducing the number of nested tables you've got.
  • One way to achieve this involves the side-menus - these could be replaced fairly simply with the heading (e.g. "Portfolio site") in an <h1> tag, specified to look as you wish in the stylesheet (text colour, background color, border style and width can all be defined for block elements such as headings). The list of links could then be put within a <ul> list, which could again have its looks defined in the stylesheet. Sadly there doesn't appear to be any way to tell the list to use the ">" character as a list marker, so you might have to put this in as an image (although someone may be able to correct me on this).

The current 'fashion' in website design is this: separate form from content. Put simply, this means that you can define nigh-on everything that actually defines how a website is displayed within your stylesheet, and have your HTML code display only the structure of the site. For instance, instead of your current code, your HTML could theoretically look something like this:
Code:
<html>
<head>--head stuff--</head>
 <body>
  <div id="header"></div>
  <div id="leftside">
   <div>
    <h1>Portfolio site</h1>
    <ul>
     <li>News</li>
     --Other links--
    </ul>
   </div>
  --Other sidebars--
  </div>
  <div id="content">
  --Whatever content there is--
  </div>
  <div id="rightside">
   --Right-hand sidebars--
  </div>
  <div id="footer">
   --Footer stuff--
  </div>
 </body>
</html>
With virtually no information about how to display the content built into the HTML. This makes your code much more easily readable, theoretically faster for browsers to display (older browsers certainly don't like many levels of nested tables, I'm not sure about newer ones) and makes it much easier to maintain. You could, for instance, have both sidebars at the left and the footer at the top with just a few changes to the stylesheet.

Sorry, ramble over. Hope this proves vaguely useful. If you'd like more details, feel free to get in touch with me (or with Jonty - he's more experienced with this than I am).
 

L_Plates

Fledgling Freddie
Joined
Dec 22, 2003
Messages
628
wyrd_fish said:
well done, although your poll is broke

looks better than the old one...


Broke its ok for me !

Whats it doin for you ?


-----

Thanks for the info and ideas aswell FB. I will agree that the main flaw left in the code is the Nested tables. I have had to do that to get the desired layout using CSS in stead of images. Over time im sure i will change the layout but for the time being the tables will have to stay.

As long as i can get rid of most junk ill be happy.

Thnaks for the comments so far guys.
 

L_Plates

Fledgling Freddie
Joined
Dec 22, 2003
Messages
628
wyrd_fish said:
it gets an action cancled on the results page

hmm everything is ok this end *Scratches Head*

What browser you using ?
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
no, its all better.

my connection was all shitty last night and so thats prolly what caused it...
 

Users who are viewing this thread

Top Bottom