I spent a good portion of last week taking my own site, rrinterative.com, out of tables, creating nice tableless css and then making sure it validated. Of course you know the one about the cobblers children - I preach search friendly valid code but when it came time to put my own site up I pretty much just threw it up there nasty old tables and all.
I’m not done - a couple of pages still need work but the biggest hurdle in the process was that the validator [as you may have experienced yourself] does not like the embed tag - you know, the one Netscape based browsers, including my version of Firefox, require or Flash will not display properly.
I didn’t want to give up the Flash file, I wanted it to validate.
And so it does with a nifty conditional statement.
This is for ColdFusion but the same thing can be done in php, .NET whatever. . .
So here is my code - I’m including it all from the opening to closing object tag:
<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0″ width=”531″ height=”179″ title=”Bubble Flash”><param name=”movie” value=”bubblesrrv1.swf” />
<param name=”quality” value=”high” />
<cfif #Find(”Netscape”,CGI.HTTP_USER_AGENT)#><embed src=”bubblesrrv1.swf” quality=”high” pluginspage=”http://www.macromedia.com/go/getflashplayer” type=”application/x-shockwave-flash” width=”531″ height=”179″ /></cfif>
<cfif #Find(”Firefox”,CGI.HTTP_USER_AGENT)#><embed src=”bubblesrrv1.swf” quality=”high” pluginspage=”http://www.macromedia.com/go/getflashplayer” type=”application/x-shockwave-flash” width=”531″ height=”179″ /></cfif></object>
I’m sure there are better methods out there. This worked for now.