SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Surely there is an easier way?

    While trawling around sites and checking out their code to see how some things are done I seen this on a page.

    Now I understand what they are doing but surely its not neccessary? The code is a mess too, but I tidied it enough to be readable!

    Code:
    <div class="menu">
    <ul>
    <li><a href='page-contact_us.html'>Contact us<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href='page-about_us.html'>About us<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='spage-about_us-annual_report.html'>Annual Report<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-auchengillan.html'>Auchengillan<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-governance.html'>Governance<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-media_centre.html'>Media Centre<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-the_bulletin.html'>Newsletter<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-our_aim.html'>Our Purpose<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-regional_team.html'>Regional Team<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-staff75.html'>Support Staff<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-the_glasgow_scout_shop.html'>The Glasgow Scout Shop<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-about_us-volunteering.html'>Volunteering<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href='page-resource_library.html'>Resources<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='spage-resource_library-activity_permit_scheme.html'>Activity Permit Scheme<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-resource_library-admin_and_policy.html'>Admin and Policy<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-resource_library-adult_training.html'>Adult Support<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-resource_library-doe_award.html'>DoE Award<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='sform-resource_library-equipment_loan.html'>Equipment Loan<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-resource_library-faqs.html'>FAQs<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-resource_library-fundraising.html'>Grants &amp; Fundraising<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='slink-resource_library-hill_activities.html'>Hill Activities<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-resource_library-recent_updates.html'>Recent Updates<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    
    </li><li><a href='cal-regional_diary.html'>Regional Diary<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href='page-latest_news.html'>News<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='snews-latest_news-2009_news.html'>2009 News<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='snews-latest_news-2008.html'>2008 News<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='sgallery-latest_news-photos.html'>Photos<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href='page-links.html'>Links<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href='page-gang_show.html'>Gang Show<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sgallery-gang_show-programme_covers.html'>Programme Covers<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href='page-events.html'>Events<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sform-events-have_your_say.html'>Have Your Say!<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='sshop-events-shop.html'>Payments<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href='page-districts.html'>Districts<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='spage-districts-calder.html'>Calder<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sslink-districts-calder-8th_airdrie.html'>8th Airdrie</a></li><li><a href='sslink-districts-calder-chapelhall_esu.html'>Chapelhall ESU</a></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-districts-clydesdale.html'>Clydesdale<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-districts-eastwood.html'>Eastwood<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sslink-districts-eastwood-77th_glasgow.html'>77th Glasgow</a></li><li><a href='sslink-districts-eastwood-121st_glasgow_.html'>121st Glasgow</a></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-districts-great_western.html'>Great Western<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sslink-districts-great_western-1st_glasgow.html'>1st Glasgow</a></li><li><a href='sslink-districts-great_western-4th_glasgow.html'>4th Glasgow</a></li><li><a href='sslink-districts-great_western-24th_glasgow.html'>24th Glasgow</a></li><li><a href='sslink-districts-great_western-204th_glasgow2.html'>204th Glasgow</a></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-districts-kelvin_valley.html'>Kelvin Valley<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-districts-south_east.html'>South East<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sslink-districts-south_east-113th_glasgow.html'>113th Glasgow</a></li><li><a href='sslink-districts-south_east-138th_glasgow.html'>138th Glasgow</a></li><li><a href='sslink-districts-south_east-185th_glasgow.html'>185th Glasgow</a></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-districts-south_western.html'>South Western<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sslink-districts-south_western-29th_glasgow.html'>29th Glasgow</a></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-districts-strathcalder.html'>Strathcalder<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='sslink-districts-strathcalder-2nd_bothwell.html'>2nd Bothwell</a></li><li><a href='sslink-districts-strathcalder-6th_east_kilbride.html'>6th East Kilbride</a></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    
    </li><li><a href='page-aj09.html'>AJ09<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><ul><li><a href='spage-aj09-activities.html'>Activities<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-aj09-faqs2.html'>FAQs<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-aj09-payments.html'>Fee Payments<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-aj09-programme.html'>Programme<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-aj09-staff.html'>Staff<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-aj09-participants.html'>Units<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><a href='spage-aj09-groups.html'>Who's coming?<!--[if gt IE 6]><!--></a><!--<![endif]--><!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]--><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li><li><a href="index.html">Home</a></li>
    </ul>
    Free2host.co.uk - My longest ever project at 10 years

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    o M G !

  3. #3
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    What Dr John said

    I think that there are better ways to do that yes...

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, agreed. Apologies if anyone failed to note the hints of sarcasm in my questions

    Sadly this code came from a supposedly reputable design and hosting company who had authored (is that the right word) many sites for customers, all contain the above and much more seemingly un-needed code.

    Just goes to show, dont even trust the designs of a designer just because thats what they claim to be!
    Free2host.co.uk - My longest ever project at 10 years

  5. #5
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    I did notice it... although my answer is still true, of course... I was being sarcastic myself by stating the obvious

  6. #6
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the best bit. I just tested their sites in IE6 and they dont work, 1px margin at the bottom of images and they obviously have not thought/bothered about equalising the columns as they are not the same size and look pants.

    OMG, only 2 weeks of learning CSS and I am beginning to sound like those that know what they are talking about
    Free2host.co.uk - My longest ever project at 10 years

  7. #7
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    EW

    That is just gross. First off they are using tables(bleh). Second, you said you cleaned it up(so it was obviously horrible). Third, at the very least they could use classes instead of all the inline crap. Fourth, even if they had to do it that way they could just do it in chunks like so:

    <!--[if gt IE 6]>Entire menu for IE here<![endif]-->

    <!--[if lt IE 7]>Entire menu for IE here><![endif]-->

    Entire menu for everything else here.

    Oh and fifth....hmmm, forget what i was gona say so um...stupid file names, and tables again(bleh).

  8. #8
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Lee7997 View Post
    ...
    Now I understand what they are doing but surely its not neccessary? The code is a mess too, but I tidied it enough to be readable!
    And they could tidy it up further.

    This is a scriptless fall out/down menu aimed at <=IE6. The sublists parents uses commented tables nested in the links to expand on hover, but all the items has them, even the sublist items.
    HTML Code:
    		<li>
    		<a href='page-gang_show.html'>Gang Show<!--[if gt IE 6]><!--></a><!--<![endif]-->
    		<!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]-->
    		<ul>
    			<li>
    			<a href='sgallery-gang_show-programme_covers.html'>Programme Covers<!--[if gt IE 6]><!--></a><!--<![endif]-->
    			<!--[if lt IE 7]><table border='0' cellpadding='0' cellspacing='0'><tr><td><![endif]-->
    			<!--[if lte IE 6]></td></tr></table></a><![endif]-->
    			</li>
    		</ul>
    		<!--[if lte IE 6]></td></tr></table></a><![endif]-->
    		</li>
    Happy ADD/ADHD with Asperger's

  9. #9
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Lee7997 View Post
    Sadly this code came from a supposedly reputable design and hosting company who had authored (is that the right word) many sites for customers, all contain the above and much more seemingly un-needed code.
    I think 'mauled' would be more appropriate than 'authored' in this case.
    Birnam wood is come to Dunsinane

  10. #10
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    I think that the real challenge here would be how to make it even harder

  11. #11
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by molona View Post
    I think that the real challenge here would be how to make it even harder
    Agree 100%

    These people need to go back to step one and learn what to do all over again.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •