<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: Alternate stylesheet for iPad</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Sun, 19 May 2013 16:51:38 +0000</pubDate>

<item>
<title>zorro on "Alternate stylesheet for iPad"</title>
<link>http://themeshaper.com/forums/topic/alternate-stylesheet-for-ipad#post-25130</link>
<pubDate>Tue, 31 Jan 2012 13:47:42 +0000</pubDate>
<dc:creator>zorro</dc:creator>
<guid isPermaLink="false">25130@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;So, what happens if someone is using, say, a macbook pro or an old laptop with &#38;gt;1024px?
&#60;/p&#62;</description>
</item>
<item>
<title>chris_s on "Alternate stylesheet for iPad"</title>
<link>http://themeshaper.com/forums/topic/alternate-stylesheet-for-ipad#post-22474</link>
<pubDate>Fri, 29 Jul 2011 15:44:03 +0000</pubDate>
<dc:creator>chris_s</dc:creator>
<guid isPermaLink="false">22474@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I feel like such an idiot. I don't know why I didn't even think about media queries. I think that could work just the same for this instance. Thanks guys. I'm definitely going to take a look at the tutorial as well. It's always helpful to have these in your arsenal.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Alternate stylesheet for iPad"</title>
<link>http://themeshaper.com/forums/topic/alternate-stylesheet-for-ipad#post-22473</link>
<pubDate>Fri, 29 Jul 2011 14:57:09 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">22473@http://themeshaper.com/forums/</guid>
<description>&#60;pre&#62;&#60;code&#62;$isiPad = (bool) strpos($_SERVER[&#38;#39;HTTP_USER_AGENT&#38;#39;],&#38;#39;iPad&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;should give a true or false&#60;br /&#62;
from: &#60;a href=&#34;http://davidwalsh.name/detect-ipad&#34; rel=&#34;nofollow&#34;&#62;http://davidwalsh.name/detect-ipad&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;and if you want to use that INSTEAD of the regular style.css then this tut might be helpful:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/&#34; rel=&#34;nofollow&#34;&#62;http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>middlesister on "Alternate stylesheet for iPad"</title>
<link>http://themeshaper.com/forums/topic/alternate-stylesheet-for-ipad#post-22471</link>
<pubDate>Fri, 29 Jul 2011 05:18:55 +0000</pubDate>
<dc:creator>middlesister</dc:creator>
<guid isPermaLink="false">22471@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Have you tried using media queries instead?&#60;br /&#62;
&#60;a href=&#34;http://www.stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries&#34; rel=&#34;nofollow&#34;&#62;http://www.stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Since code is not so long, you can add your css declarations directly in your style.css and not worry about loading an extra stylesheet&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/* iPads (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
	body.page {
		background: #6d80b5;
	}

	body.page #ipad-back {
		display: none;
	}

	#ipad-back {
	    background: url(images/menu-btn.png) no-repeat scroll 0 0 transparent;
	    height: 45px;
	    width: 134px;
		float: right;
		margin-bottom: 25px;
	}

	#ipad-back a {
		display: inline-block;
		color: #fff;
		font-weight: bold;
		position: relative;
		top: 10px;
		left: 25px;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Otherwise, you can load a separate ipad stylesheet with&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;link rel=&#38;quot;stylesheet&#38;quot; href=&#38;quot;ipad.css&#38;quot; media=&#38;quot;only screen and (min-device-width : 768px) and (max-device-width : 1024px)&#38;quot;&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;No need to do a preg match in that case.
&#60;/p&#62;</description>
</item>
<item>
<title>chris_s on "Alternate stylesheet for iPad"</title>
<link>http://themeshaper.com/forums/topic/alternate-stylesheet-for-ipad#post-22465</link>
<pubDate>Thu, 28 Jul 2011 19:23:27 +0000</pubDate>
<dc:creator>chris_s</dc:creator>
<guid isPermaLink="false">22465@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Well this worked for this one. Thanks for helping to clear that up! I'm fairly up to speed with CSS but maybe there's a more logical way to do this. When the iPad loads the page, it first loads a repeating bg image, which is in my main style.css, then loads the ipad.css file. So there's a flash that takes effect before the body.page bg loads from the ipad.css file. Do you think there's a more efficient way to do the CSS for this instance? Should I be loading the ipad.css differently?
&#60;/p&#62;</description>
</item>
<item>
<title>middlesister on "Alternate stylesheet for iPad"</title>
<link>http://themeshaper.com/forums/topic/alternate-stylesheet-for-ipad#post-22464</link>
<pubDate>Thu, 28 Jul 2011 18:52:52 +0000</pubDate>
<dc:creator>middlesister</dc:creator>
<guid isPermaLink="false">22464@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Maybe it's the same thing here as in the other thread: use  get_stylesheet_directory_uri instead of get_template_directory_uri. The former refers to your child theme, while the latter refers to the thematic parent theme.
&#60;/p&#62;</description>
</item>
<item>
<title>chris_s on "Alternate stylesheet for iPad"</title>
<link>http://themeshaper.com/forums/topic/alternate-stylesheet-for-ipad#post-22457</link>
<pubDate>Thu, 28 Jul 2011 15:59:20 +0000</pubDate>
<dc:creator>chris_s</dc:creator>
<guid isPermaLink="false">22457@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I'm have a lot of fun with this one! So I have the following code and it's not working. Should I be using a Thematic hook instead? Where am i going wrong with this? It does work with an absolute URL address, but I obviously do not want that in the event things change down the line.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function ipad_css() {
if( preg_match(&#38;#39;/ipad/i&#38;#39;,$_SERVER[&#38;#39;HTTP_USER_AGENT&#38;#39;])) {?&#38;gt;
    &#38;lt;link rel=&#38;quot;stylesheet&#38;quot; type=&#38;quot;text/css&#38;quot; href=&#38;quot;&#38;lt;?php echo get_template_directory_uri(); ?&#38;gt;/ipad.css&#38;quot; media=&#38;quot;screen&#38;quot; /&#38;gt;
	&#38;lt;?php }
}
add_action(&#38;#39;wp_print_styles&#38;#39;,&#38;#39;ipad_css&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;In the event it matters, this is what is in my ipad.css stylesheet.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;@import url(&#38;#39;../style.css&#38;#39;);

body.page {
	background: #6d80b5;
}

body.page #ipad-back {
	display: none;
}

#ipad-back {
    background: url(images/menu-btn.png) no-repeat scroll 0 0 transparent;
    height: 45px;
    width: 134px;
	float: right;
	margin-bottom: 25px;
}

#ipad-back a {
	display: inline-block;
	color: #fff;
	font-weight: bold;
	position: relative;
	top: 10px;
	left: 25px;
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>

</channel>
</rss>
