<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Top SEO Tips &#187; Accessibility</title> <atom:link href="http://www.topsemtips.com/category/webdesignanddevelopment/accessibility/feed/" rel="self" type="application/rss+xml" /><link>http://www.topsemtips.com</link> <description>SEO and Link Building Tips</description> <lastBuildDate>Wed, 01 Sep 2010 15:10:34 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>Save HTML Table to Excel using jQuery</title><link>http://www.topsemtips.com/2008/11/save-html-table-to-excel-using-jquery/</link> <comments>http://www.topsemtips.com/2008/11/save-html-table-to-excel-using-jquery/#comments</comments> <pubDate>Fri, 07 Nov 2008 18:47:08 +0000</pubDate> <dc:creator>Dylan</dc:creator> <category><![CDATA[Accessibility]]></category> <category><![CDATA[jQuery]]></category><guid isPermaLink="false">http://www.topsemtips.com/?p=393</guid> <description><![CDATA[After a few hours work looking into this, this turned out really easy to implement using jQuery and server side PHP programming as follows: On the client side the following HTML code needs adding to the page: &#60;form action=&#34;/SaveToExcel.php&#34; method=&#34;post&#34; target=&#34;_blank&#34; onsubmit=&#039;$(&#34;#datatodisplay&#34;).val( $(&#34;&#60;div&#62;&#34;).append( $(&#34;#ReportTable&#34;).eq(0).clone() ).html() )&#039;&#62; &#60;pre&#62;&#60;input type=&#34;image&#34; src=&#34;/images/icons/Floppy-48x48.png&#34; width=&#34;12&#34; height=&#34;12&#34;&#62;&#60;/pre&#62; &#60;pre&#62;&#60;input type=&#34;hidden&#34; id=&#34;datatodisplay&#34; name=&#34;datatodisplay&#34; [...]<p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/11/save-html-table-to-excel-using-jquery/">Save HTML Table to Excel using jQuery</a></p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/12/jquery-automatic-trim-of-input-fields/' rel='bookmark' title='Permanent Link: jQuery Automatic Trim of Input Fields'>jQuery Automatic Trim of Input Fields</a></li><li><a href='http://www.topsemtips.com/2006/07/html-meta-tags-what-are-they-and-how-do-you-use-them-on-your-website/' rel='bookmark' title='Permanent Link: HTML Meta Tags &#8211; What are they and how do you use them on your website?'>HTML Meta Tags &#8211; What are they and how do you use them on your website?</a></li><li><a href='http://www.topsemtips.com/2008/12/jquery-add-a-default-button-to-a-page/' rel='bookmark' title='Permanent Link: jQuery &#8211; Add a default button to a page'>jQuery &#8211; Add a default button to a page</a></li><li><a href='http://www.topsemtips.com/2004/07/the-importance-of-clean-html-code/' rel='bookmark' title='Permanent Link: The Importance of Clean HTML Code'>The Importance of Clean HTML Code</a></li><li><a href='http://www.topsemtips.com/2010/04/issues-creating-and-downloading-file-in-ie-from-php/' rel='bookmark' title='Permanent Link: Issues Creating and Downloading File in IE from PHP'>Issues Creating and Downloading File in IE from PHP</a></li></ol>]]></description> <content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F11%2Fsave-html-table-to-excel-using-jquery%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F11%2Fsave-html-table-to-excel-using-jquery%2F&amp;style=normal" height="61" width="50" /><br /> </a></div><p>After a few hours work looking into this, this turned out really easy to implement using jQuery and server side PHP programming as follows:</p><p>On the client side the following HTML code needs adding to the page:</p><pre class="html">
<span class="htmlFormTag">&lt;form action=<span class="htmlAttributeValue">&quot;/SaveToExcel.php&quot;</span> method=<span class="htmlAttributeValue">&quot;post&quot;</span> target=<span class="htmlAttributeValue">&quot;_blank&quot;</span>
onsubmit=<span class="htmlAttributeValue">&#039;$(&quot;#datatodisplay&quot;).val( $(&quot;<span class="htmlOtherTag">&lt;div&gt;</span></span>&quot;).append( $(&quot;#ReportTable&quot;).eq(0).clone() ).html() )&#039;</span>&gt;
<span class="htmlOtherTag">&lt;pre&gt;</span><span class="htmlFormTag">&lt;input  type=<span class="htmlAttributeValue">&quot;image&quot;</span> src=<span class="htmlAttributeValue">&quot;/images/icons/Floppy-48x48.png&quot;</span> width=<span class="htmlAttributeValue">&quot;12&quot;</span> height=<span class="htmlAttributeValue">&quot;12&quot;</span>&gt;</span><span class="htmlOtherTag">&lt;/pre&gt;</span>
<span class="htmlOtherTag">&lt;pre&gt;</span><span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;hidden&quot;</span> id=<span class="htmlAttributeValue">&quot;datatodisplay&quot;</span> name=<span class="htmlAttributeValue">&quot;datatodisplay&quot;</span> /&gt;</span>
<span class="htmlFormTag">&lt;/form&gt;</span>
</pre><p>Note &#8211; variables used above &#8211; ReportTable is the id of the table you want to save and datatodisplay is a hidden variable used to post the table to the server.</p><p>The jQuery commands were added to the form&#8217;s onsubmit event but could easily be in your $(function(){}); fuction</p><p>The hard part here was getting all of the &lt;table&gt; HTML code. The standard jQuery .html() command gets the innerHTML and was cutting off the &lt;table&gt; HTML code. Getting all the HTML code was accomplished using the code $(&#8220;#datatodisplay&#8221;).val( $(&#8220;&lt;div&gt;&#8221;).append( $(&#8220;#ReportTable&#8221;).eq(0).clone() ).html() ) which effectively gets the outerHTML of the named HTML object (in this case the table we want to save to excel).</p><p>On the server side create a file called&#8217;SaveToExcel.php&#8217; and add the following code:</p><pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">"Content-type<span class="phpOperator">:</span> application/vnd<span class="phpOperator">.</span>ms-excel; name=<span class="phpString">'excel'</span>"</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">"Content-Disposition<span class="phpOperator">:</span> filename=export.xls"</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">// Fix<span class="phpKeyword"> for </span><span class="htmlText">crappy IE bug in download</span><span class="phpOperator">.</span>
</span><span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">"Pragma<span class="phpOperator">:</span> "</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">"Cache-Control<span class="phpOperator">:</span> "</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
<span class="htmlOtherTag">&lt;html&gt;</span>
<span class="htmlOtherTag">&lt;head&gt;</span><span class="htmlOtherTag">&lt;/head&gt;</span>
<span class="htmlOtherTag">&lt;body&gt;</span><span class="htmlOtherTag">&lt;?=$_REQUEST[&#039;datatodisplay&#039;]?&gt;</span>
<span class="htmlOtherTag">&lt;/body&gt;</span>
<span class="htmlOtherTag">&lt;/html&gt;</span>
</pre><p>Updated: April 8, 2010 &#8211; modified to add fix for crappy IE download bug.</pre><p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/11/save-html-table-to-excel-using-jquery/">Save HTML Table to Excel using jQuery</a></p><p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/12/jquery-automatic-trim-of-input-fields/' rel='bookmark' title='Permanent Link: jQuery Automatic Trim of Input Fields'>jQuery Automatic Trim of Input Fields</a></li><li><a href='http://www.topsemtips.com/2006/07/html-meta-tags-what-are-they-and-how-do-you-use-them-on-your-website/' rel='bookmark' title='Permanent Link: HTML Meta Tags &#8211; What are they and how do you use them on your website?'>HTML Meta Tags &#8211; What are they and how do you use them on your website?</a></li><li><a href='http://www.topsemtips.com/2008/12/jquery-add-a-default-button-to-a-page/' rel='bookmark' title='Permanent Link: jQuery &#8211; Add a default button to a page'>jQuery &#8211; Add a default button to a page</a></li><li><a href='http://www.topsemtips.com/2004/07/the-importance-of-clean-html-code/' rel='bookmark' title='Permanent Link: The Importance of Clean HTML Code'>The Importance of Clean HTML Code</a></li><li><a href='http://www.topsemtips.com/2010/04/issues-creating-and-downloading-file-in-ie-from-php/' rel='bookmark' title='Permanent Link: Issues Creating and Downloading File in IE from PHP'>Issues Creating and Downloading File in IE from PHP</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.topsemtips.com/2008/11/save-html-table-to-excel-using-jquery/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>Make WordPress Mobile Friendly</title><link>http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/</link> <comments>http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/#comments</comments> <pubDate>Tue, 15 Jul 2008 19:01:41 +0000</pubDate> <dc:creator>Dylan</dc:creator> <category><![CDATA[Accessibility]]></category> <category><![CDATA[Web Design and Development]]></category><guid isPermaLink="false">http://www.topsemtips.com/?p=347</guid> <description><![CDATA[Following on my theme for this week, here are the steps to make WordPress mobile friendly. This assumes you are using a separate URL for your mobile friendly wordpress (such as sitename.mobi): 1 &#8211; Buy your domain and park it on your current WordPress site, so sitename.com and sitename.mobi are generating the same content 2 [...]<p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/">Make WordPress Mobile Friendly</a></p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly'>Making Your Site Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly &#8211; CSS'>Making Your Site Mobile Friendly &#8211; CSS</a></li><li><a href='http://www.topsemtips.com/2006/01/search-engine-friendly-301-redirect-in-php/' rel='bookmark' title='Permanent Link: Search Engine Friendly 301 Redirect in PHP'>Search Engine Friendly 301 Redirect in PHP</a></li><li><a href='http://www.topsemtips.com/2005/05/copywriting-makeover-search-engine-friendly-can-also-mean-visitor-friendly/' rel='bookmark' title='Permanent Link: Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly'>Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly</a></li><li><a href='http://www.topsemtips.com/2006/01/search-engine-friendly-301-redirect-in-cfm-coldfusion/' rel='bookmark' title='Permanent Link: Search Engine Friendly 301 Redirect in CFM Coldfusion'>Search Engine Friendly 301 Redirect in CFM Coldfusion</a></li></ol>]]></description> <content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F07%2Fmake-wordpress-mobile-friendly%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F07%2Fmake-wordpress-mobile-friendly%2F&amp;style=normal" height="61" width="50" /><br /> </a></div><p>Following on my theme for this week, here are the steps to make WordPress mobile friendly. This assumes you are using a separate URL for your mobile friendly wordpress (such as sitename.mobi):</p><p>1 &#8211; Buy your domain and park it on your current WordPress site, so sitename.com and sitename.mobi are generating the same content</p><p>2 &#8211; Add (or modify) the file /wp-content/themes/yourtheme/functions.php and add the following lines:</p><p>&lt;?php<br /> remove_action(&#8216;template_redirect&#8217;, &#8216;redirect_canonical&#8217;);</p><p>function elixir_urlrewrite( $url ) {<br />  if ( strpos( $url, get_bloginfo(&#8220;url&#8221;,&#8221;raw&#8221;) ) === false )<br />   return $url ;<br />   <br />  $urlparts = parse_url($url) ;<br />  $url = str_replace( $urlparts[scheme] . &#8220;://&#8221; . $urlparts[host] , &#8220;&#8221; , $url ) ;<br />  if ( strlen( $url ) == 0 )<br />   $url = &#8220;/&#8221; ;<br />  return $url ;<br /> }</p><p>add_action(&#8216;day_link&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;feed_link&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;month_link&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;page_link&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;post_link&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;the_permalink&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;year_link&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;category_link&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> add_action(&#8216;bloginfo_url&#8217;, &#8216;elixir_urlrewrite&#8217;);<br /> ?&gt;</p><p>This will cause your wordpress installation to rewrite all links to remove sitename.com from them &#8211; this stops a mobile visitor always being redirected to the .com site</p><p>3 &#8211; Modify your .htaccess file and add the following lines (replacing sitename with your site name as applicable):</p><p>Options All -Indexes</p><p>&lt;IfModule mod_rewrite.c&gt;<br /> RewriteEngine On<br /> RewriteBase /<br /> RewriteCond %{HTTP_HOST} ^sitename\.com$<br /> RewriteRule ^(.*)$ <a href="http://www.sitename.com/$1">http://www.sitename.com/$1</a> [R=301,L]<br /> RewriteCond %{HTTP_HOST} ^sitename\.mobi$<br /> RewriteRule ^(.*)$ <a href="http://www.sitename.mobi/$1">http://www.sitename.mobi/$1</a> [R=301,L]<br /> &lt;/IfModule&gt;</p><p>This replaces the built in &#8216;redirect_canonical&#8217; so that it handles .com and .mobi correctly.</p><p>4 &#8211; modify your template so that it changes the doctype for a mobile device. Modify your header.php fie and replace the current &#8216;doctype&#8217; line as follows:</p><p>&lt;?php<br /> function checkmobile(){<br />  // Always mobile enabled on .mobi<br />  if ( strpos( strtolower( $_SERVER['HTTP_HOST'] ) , &#8220;.mobi&#8221; ) !== false )<br />   return true ;<br />   <br />   <br />  if(isset($_SERVER["HTTP_X_WAP_PROFILE"])) return true;<br />  <br />  if(preg_match(&#8220;/wap\.|\.wap/i&#8221;,$_SERVER["HTTP_ACCEPT"])) return true;<br />  <br />  if(isset($_SERVER["HTTP_USER_AGENT"])){<br />  <br />  $uamatches = array(&#8220;midp&#8221;, &#8220;j2me&#8221;, &#8220;avantg&#8221;, &#8220;docomo&#8221;, &#8220;novarra&#8221;, &#8220;palmos&#8221;, &#8220;palmsource&#8221;, &#8220;240&#215;320&#8243;, &#8220;opwv&#8221;, &#8220;chtml&#8221;, &#8220;pda&#8221;, &#8220;windows\ ce&#8221;, &#8220;mmp\/&#8221;, &#8220;blackberry&#8221;, &#8220;mib\/&#8221;, &#8220;symbian&#8221;, &#8220;wireless&#8221;, &#8220;nokia&#8221;, &#8220;hand&#8221;, &#8220;mobi&#8221;, &#8220;phone&#8221;, &#8220;cdm&#8221;, &#8220;up\.b&#8221;, &#8220;audio&#8221;, &#8220;SIE\-&#8221;, &#8220;SEC\-&#8221;, &#8220;samsung&#8221;, &#8220;HTC&#8221;, &#8220;mot\-&#8221;, &#8220;mitsu&#8221;, &#8220;sagem&#8221;, &#8220;sony&#8221;, &#8220;alcatel&#8221;, &#8220;lg&#8221;, &#8220;eric&#8221;, &#8220;vx&#8221;, &#8220;NEC&#8221;, &#8220;philips&#8221;, &#8220;mmm&#8221;, &#8220;xx&#8221;, &#8220;panasonic&#8221;, &#8220;sharp&#8221;, &#8220;wap&#8221;, &#8220;sch&#8221;, &#8220;rover&#8221;, &#8220;pocket&#8221;, &#8220;benq&#8221;, &#8220;java&#8221;, &#8220;pt&#8221;, &#8220;pg&#8221;, &#8220;vox&#8221;, &#8220;amoi&#8221;, &#8220;bird&#8221;, &#8220;compal&#8221;, &#8220;kg&#8221;, &#8220;voda&#8221;, &#8220;sany&#8221;, &#8220;kdd&#8221;, &#8220;dbt&#8221;, &#8220;sendo&#8221;, &#8220;sgh&#8221;, &#8220;gradi&#8221;, &#8220;jb&#8221;, &#8220;\d\d\di&#8221;, &#8220;moto&#8221;);<br />  <br />  foreach($uamatches as $uastring){<br />   if(preg_match(&#8220;/&#8221;.$uastring.&#8221;/i&#8221;,$_SERVER["HTTP_USER_AGENT"])) return true;<br />  }<br />  <br />  }<br />  return false;<br /> }  </p><p>if ( checkmobile() == true &amp;&amp;<br />  strcmp( strtolower( $_SERVER['HTTP_HOST'] ) , &#8220;<a href="http://www.sitename.mobi">www.sitename.mobi</a>&#8221; ) != 0 &amp;&amp;<br />  strcmp( strtolower( $_SERVER['REQUEST_METHOD'] ) , &#8220;get&#8221; ) == 0 &amp;&amp;<br />  $_SERVER['SERVER_PORT'] == 80 )<br /> {<br />  header(&#8220;HTTP/1.1 301 Moved Permanently&#8221;);<br />  header(&#8220;Location: <a href="http://www.sitename.mobi">http://www.sitename.mobi</a>&#8221; . $_SERVER['REQUEST_URI']);<br />  exit();<br /> }<br /> if ( checkmobile() == true )<br /> { ?&gt;<br /> &lt;!DOCTYPE html PUBLIC &#8220;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&#8221; &#8220;<a href="http://www.openmobilealliance.org/tech/DTD/xhtml-mobile10.dtd">http://www.openmobilealliance.org/tech/DTD/xhtml-mobile10.dtd</a>&#8220;&gt;<br /> &lt;?php<br /> }<br /> else<br /> { ?&gt;<br /> &lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#8220;&gt;<br /> &lt;?php<br /> }<br /> ?&gt;</p><p> </p><p>5 &#8211; view with a mobile device. This is when you will need to change your CSS and page layout to take into account the limitations of the mobile environment. THis was covered in previous posts:</p><p><a href="http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/">Making Your Site Mobile Friendly &#8211; CSS</a></p><p> To see this in action visit <a href="http://www.fionndownhill.mobi/">http://www.fionndownhill.mobi/</a> </p><p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/">Make WordPress Mobile Friendly</a></p><p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly'>Making Your Site Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly &#8211; CSS'>Making Your Site Mobile Friendly &#8211; CSS</a></li><li><a href='http://www.topsemtips.com/2006/01/search-engine-friendly-301-redirect-in-php/' rel='bookmark' title='Permanent Link: Search Engine Friendly 301 Redirect in PHP'>Search Engine Friendly 301 Redirect in PHP</a></li><li><a href='http://www.topsemtips.com/2005/05/copywriting-makeover-search-engine-friendly-can-also-mean-visitor-friendly/' rel='bookmark' title='Permanent Link: Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly'>Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly</a></li><li><a href='http://www.topsemtips.com/2006/01/search-engine-friendly-301-redirect-in-cfm-coldfusion/' rel='bookmark' title='Permanent Link: Search Engine Friendly 301 Redirect in CFM Coldfusion'>Search Engine Friendly 301 Redirect in CFM Coldfusion</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Making Your Site Mobile Friendly &#8211; CSS</title><link>http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/</link> <comments>http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/#comments</comments> <pubDate>Tue, 08 Jul 2008 23:34:01 +0000</pubDate> <dc:creator>Dylan</dc:creator> <category><![CDATA[Accessibility]]></category><guid isPermaLink="false">http://www.topsemtips.com/?p=344</guid> <description><![CDATA[CSS is vitally important in making your site mobile ready. I ended up making 3 CSS media sections in one CSS file: @media screen &#8211; contains all the CSS positioning informaiton, font sizes needed for the screen, etc. @media handheld &#8211; the CSS for handhelds. This removed a lot of unneeded parts of the screen [...]<p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/">Making Your Site Mobile Friendly &#8211; CSS</a></p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly'>Making Your Site Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/' rel='bookmark' title='Permanent Link: Make WordPress Mobile Friendly'>Make WordPress Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2004/08/search-engine-friendly-site-map/' rel='bookmark' title='Permanent Link: Search Engine Friendly Site Map'>Search Engine Friendly Site Map</a></li><li><a href='http://www.topsemtips.com/2005/05/copywriting-makeover-search-engine-friendly-can-also-mean-visitor-friendly/' rel='bookmark' title='Permanent Link: Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly'>Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly</a></li><li><a href='http://www.topsemtips.com/2009/01/seo-site-review-httpwwwsilvaheerencom/' rel='bookmark' title='Permanent Link: SEO Site Review &#8211; http://www.silvaheeren.com'>SEO Site Review &#8211; http://www.silvaheeren.com</a></li></ol>]]></description> <content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F07%2Fmaking-your-site-mobile-friendly-css%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F07%2Fmaking-your-site-mobile-friendly-css%2F&amp;style=normal" height="61" width="50" /><br /> </a></div><p>CSS is vitally important in making your site mobile ready. I ended up making 3 CSS media sections in one CSS file:</p><ul><li>@media screen &#8211; contains all the CSS positioning informaiton, font sizes needed for the screen, etc.</li><li>@media handheld &#8211; the CSS for handhelds. This removed a lot of unneeded parts of the screen (footer text), and doesn&#8217;t include positioning information.</li><li>@media print &#8211; CSS for when the page is printed. This changes the font size for printing, labels links for printing, turns off unnecessary navigation (left hand menus, footer, etc) and anything else to make your site look good when printed.</li></ul><p>All CSS for these sections should be contained within curly brackets {}</p><blockquote><pre>@media print{
 *{
 	font-size: 12pt;
 	font-family:Georgia, "Times New Roman", Times, serif;
 }
 a{
 	color: #520;
 	background: transparent;
 	font-weight: bold;
 	text-decoration: underline;
 }
}</pre></blockquote><p>All of these sections can be in their own CSS files and included using the include syntax:</p><blockquote><pre>&lt;style&gt;
 @import url("print.css") print;
&lt;/style&gt;</pre></blockquote><p>or</p><blockquote><pre>&lt;LINK rel="stylesheet" type="text/css" media="print" href="print.css"&gt;</pre></blockquote><p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/">Making Your Site Mobile Friendly &#8211; CSS</a></p><p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly'>Making Your Site Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/' rel='bookmark' title='Permanent Link: Make WordPress Mobile Friendly'>Make WordPress Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2004/08/search-engine-friendly-site-map/' rel='bookmark' title='Permanent Link: Search Engine Friendly Site Map'>Search Engine Friendly Site Map</a></li><li><a href='http://www.topsemtips.com/2005/05/copywriting-makeover-search-engine-friendly-can-also-mean-visitor-friendly/' rel='bookmark' title='Permanent Link: Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly'>Copywriting Makeover: Search Engine-Friendly Can Also Mean Visitor-Friendly</a></li><li><a href='http://www.topsemtips.com/2009/01/seo-site-review-httpwwwsilvaheerencom/' rel='bookmark' title='Permanent Link: SEO Site Review &#8211; http://www.silvaheeren.com'>SEO Site Review &#8211; http://www.silvaheeren.com</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Making Your Site Mobile Friendly</title><link>http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/</link> <comments>http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/#comments</comments> <pubDate>Thu, 03 Jul 2008 20:31:21 +0000</pubDate> <dc:creator>Dylan</dc:creator> <category><![CDATA[Accessibility]]></category><guid isPermaLink="false">http://www.topsemtips.com/?p=342</guid> <description><![CDATA[Setting up CSS for mobile phones is easy enough but what about modifying your site to handle these users. Considering the total people using a mobile phone to surf in a business environment is minimal so you want to minimize the additional webmaster time spent supporting this implementation. I found this script at http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/ that detects [...]<p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/">Making Your Site Mobile Friendly</a></p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly &#8211; CSS'>Making Your Site Mobile Friendly &#8211; CSS</a></li><li><a href='http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/' rel='bookmark' title='Permanent Link: Make WordPress Mobile Friendly'>Make WordPress Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2004/08/search-engine-friendly-site-map/' rel='bookmark' title='Permanent Link: Search Engine Friendly Site Map'>Search Engine Friendly Site Map</a></li><li><a href='http://www.topsemtips.com/2004/08/calls-to-action-making-them-fit-makes-all-the-difference/' rel='bookmark' title='Permanent Link: Calls-To-Action: Making Them Fit Makes All the Difference'>Calls-To-Action: Making Them Fit Makes All the Difference</a></li><li><a href='http://www.topsemtips.com/2006/05/making-it-easy-for-customers-to-choose-you/' rel='bookmark' title='Permanent Link: Making It Easy for Customers To Choose You'>Making It Easy for Customers To Choose You</a></li></ol>]]></description> <content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F07%2Fmaking-your-site-mobile-friendly%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F07%2Fmaking-your-site-mobile-friendly%2F&amp;style=normal" height="61" width="50" /><br /> </a></div><p>Setting up CSS for mobile phones is easy enough but what about modifying your site to handle these users. Considering the total people using a mobile phone to surf in a business environment is minimal so you want to minimize the additional webmaster time spent supporting this implementation.</p><p>I found this script at <a href="http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/">http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/</a> that detects mobile phones. It&#8217;s very simple to implement. I call this script and use it to decide what parts of a page to send to the visitor. For example the top nav on our main site is graphics, by checking the visitor is mobile I output an unordered list of navigation links.</p><p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/">Making Your Site Mobile Friendly</a></p><p>Related posts:<ol><li><a href='http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly-css/' rel='bookmark' title='Permanent Link: Making Your Site Mobile Friendly &#8211; CSS'>Making Your Site Mobile Friendly &#8211; CSS</a></li><li><a href='http://www.topsemtips.com/2008/07/make-wordpress-mobile-friendly/' rel='bookmark' title='Permanent Link: Make WordPress Mobile Friendly'>Make WordPress Mobile Friendly</a></li><li><a href='http://www.topsemtips.com/2004/08/search-engine-friendly-site-map/' rel='bookmark' title='Permanent Link: Search Engine Friendly Site Map'>Search Engine Friendly Site Map</a></li><li><a href='http://www.topsemtips.com/2004/08/calls-to-action-making-them-fit-makes-all-the-difference/' rel='bookmark' title='Permanent Link: Calls-To-Action: Making Them Fit Makes All the Difference'>Calls-To-Action: Making Them Fit Makes All the Difference</a></li><li><a href='http://www.topsemtips.com/2006/05/making-it-easy-for-customers-to-choose-you/' rel='bookmark' title='Permanent Link: Making It Easy for Customers To Choose You'>Making It Easy for Customers To Choose You</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.topsemtips.com/2008/07/making-your-site-mobile-friendly/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: www.topsemtips.com @ 2010-09-03 13:30:49 -->