<?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>SPWD &#187; CSS</title>
	<atom:link href="http://www.southplattewebdesign.com/category/web-design/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.southplattewebdesign.com</link>
	<description>Modern Web Development</description>
	<lastBuildDate>Sat, 11 Sep 2010 01:55:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>New Theme Launched</title>
		<link>http://www.southplattewebdesign.com/2009/04/11/new-theme-launched/</link>
		<comments>http://www.southplattewebdesign.com/2009/04/11/new-theme-launched/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 19:12:57 +0000</pubDate>
		<dc:creator>Billy</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Off-Topic]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.southplattewebdesign.com/?p=482</guid>
		<description><![CDATA[Just put up a new theme on the blog. It&#8217;s my first customization attempt at a WordPress theme. Let me know what you think! I tried to keep it clean and simple, much better readability I think than the old black background with white text theme I had. I do still have some items to [...]]]></description>
			<content:encoded><![CDATA[<p>Just put up a new theme on the blog.  It&#8217;s my first customization attempt at a WordPress theme.  Let me know what you think!  I tried to keep it clean and simple, much better readability I think than the old black background with white text theme I had.</p>
<p>I do still have some items to change and tweak up, but that&#8217;s okay.  I had to publish it at this point, or else it probably never would get done &#8211; at least only having a few tweaks left will motivate me to get them done since it is  now live.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.southplattewebdesign.com/2009/04/11/new-theme-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XHTML, PHP, Validation and Browsers</title>
		<link>http://www.southplattewebdesign.com/2007/09/27/xhtml-php-validation-and-browsers/</link>
		<comments>http://www.southplattewebdesign.com/2007/09/27/xhtml-php-validation-and-browsers/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 22:09:29 +0000</pubDate>
		<dc:creator>Billy</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.southplattewebdesign.com/2007/09/27/xhtml-php-validation-and-browsers/</guid>
		<description><![CDATA[Recently for a school project I was working on, I had to develop an XTHML 1.1 Strict validated page and a validated CSS to style the page. This was not a problem in and of itself, however there were several problems that I encountered while trying to serve the pages to different browsers and to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently for a school project I was working on, I had to develop an XTHML 1.1 Strict validated page and a validated CSS to style the page.  This was not a problem in and of itself, however there were several problems that I encountered while trying to serve the pages to different browsers and to the <a href="http://validator.w3.org">W3C&#8217;s validator</a>.</p>
<p>What this post will attempt to do is cover several items that I found necessary to accomplish a page that displayed properly in Internet Explorer 7, Firefox 2, Netscape 9, SeaMonkey, Opera and Safari for Windows.  I have not fully tested the resulting pages on the Linux or Mac platforms yet, so I will attempt to do that when time permits.  I did however use BrowserCamp to get a screen shot of what it looks like in Safari 2.0.4 and there were some CSS issues (I assume anyway).</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-7075532492661516";
google_ad_slot = "5786058018";
google_ad_width = 300;
google_ad_height = 250;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p><span id="more-35"></span><br />
The first thing that happened when I attempted to view the page in Firefox was that the body background color did not fill the entire page as it does on IE.  The problem, it appears, is caused from the implementation of the Body tag in an XHTML 1.1 doctype.  The body tag has been revamped so that it truly is only the content area of the size specified.  Thus, I had specified a body of 770 pixels wide, therefore in Firefox, which implements the XHTML standard, showed a body background of 770 pixels wide rather than filling the screen.  In IE, the entire body backgorund filled the whitespace.  Why?  To answer that I have to take you on a journey into mime-types, doctypes and standards compliance browsers&#8230;&#8230;.Let&#8217;s go.</p>
<p>The XHTML 1.1 specification denotes that all documents of this type SHOULD be sent with the application/xhtml+xml mime-type.  Huh?  What that means is the server, whether through the configuration of it (in my case apache), through .htaccess or programatically should send the document as the mime-type of application/xhtml+xml.  The problem is, my server was configured to send all documents as text/html if the extension and/or mime-type were not known.  No big deal, I added the supporting mime-type in my conf files and specified it for documents with an .xhtml extension only since I host several sites on here that all use .htm, .html or .php extensions.  I didn&#8217;t want to specify a mime-type for a standard file extension and start sending regular HTML documents as application/xhtml+xml.</p>
<p>So that takes me to the next phase of this project.  I found that after I did this, the validator stopped complaining on files with .xhtml extension, but that files with .php were still being sent as text/html.  I could not send all my PHP files on my various sites as application/xhtml+xml, so I couldn&#8217;t register .php as that mime-type.  What I could do though was register PHP files in this current directory that I was serving them out of as application/xhtml+xml via .htaccess.  Sounds great right?  Sovles the problem right?  Wrong.  Unfortunately when I enabled this, I found out that it then bypassed the PHP interpreter and the pages would not render any PHP code in them due to that.  So, I have XHTML 1.1 validated pages, but they are not parsed as PHP.  I also did not want to parse every html or xhtml page through the PHP parser, that would be a waste of resources really.</p>
<p>After searching on Goolge, I found out that I was not the only person struggling with this issue.  I will list the resources I used in my final solution at the end of this post to give credit where credit is due.  BTW, around this time I also find that the browsers are displaying the page different, as mentioned in the first paragraph here.  Mime-types again and compiant browser support&#8230;..</p>
<p>PHP has the ability to modify headers programatically, thus providing an anwer to this part of the delima.  The end result is that through various resources I found that I could setup a PHP document to be sent as application/xhtml+xml to the browsers and validator that required and supported that mime-type, send it as text/html mime-type to IE and other browsers that required that and still have the PHP interpreter parse the pages PHP code properly.  Want a code snippet?  Here you go:</p>
<p>[quickcode: PHP Header- Content-Type: modifications]<br />
<?php<br />
header("Vary: Accept");<br />
if(stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml"))<br />
        header("Content-Type: application/xhtml+xml; charset=utf-8");<br />
elseif(stristr($_SERVER["HTTP_USER_AGENT"], "W3C_Validator") || stristr($_SERVER["HTTP_USER_AGENT"], "WDG_Validator"))<br />
        header("Content-Type: application/xhtml+xml; charset=utf-8");<br />
else<br />
        header("Content-Type: text/html; charset=utf-8");</p>
<p>?><br />
[/quickcode]</p>
<p>What the code does:  It first sees if the user agent is capable of the mime-type of application/xhtml+xml, and if it is sets the mime-type accordingly.  If that is not the case, it checks to see if it is the validator engine accessing it, and if so, sets the mime-type to be proper for the application/xhtml+xml type.  If both of those checks come back as false, it will fall back to text/html, for IE in other words.</p>
<p>This is important to note:  It is not fooling the Validator in to validating the page.  It is adjusting the mime-type according to user agent and user agent capabilities.  In this case it is sending the appropriate mime-type to compliant browsers and the validator engine, while sending the expected type to non-conforming browsers and agents.</p>
<p>So now, I have PHP files that will be parsed by the PHP engine, have the extnesion of .php, and are being send with the appropriate mime-type based upon what agent is requesting it and what that agent&#8217;s capabilities are.  Validation problem solved, but I still am having the white space and other problems occuring accross different browsers.  Why?  </p>
<p>The DOM in XHMTL is access and handled differently than in prior HTMl versions, and when a compliant user agent is accessing the page, this difference becomes manifested in the display of the page.  In that aspect, how the body tag is handled differs between the two mime-types (application/xhtml+xml and text/html) in how a compliant browser displays them.  The body tag is as the body is defined.  If you define the body via CSS to be 770&#215;500 pixels in size, with a background-color of #669900 you will have a box in an XHTML compliant browser that is 770&#215;500 pixels in size that has the color of #669900.  However, in a non-compliant browser or when using text/html as the mime-type for this document, you will find that the entire page background is the color #669900.  The solution?  Apply the color or background image to the html tag as well as the body tag and it should work in both complaint and non-compliant browsers, as well as with both mime-types.</p>
<p>So now I have a validated XHTML 1.1 and CSS layout based page, that is with the .php extension, is passed through the PHP parser as it should be, is rendered as application/xhtml+xml by supporting browser and the W3&#8242;s Validator, and is rendered as text/html by user agents and browsers (such as Internet Explorer) that do not support the XHTML specification.</p>
<p>All is good in the world again.  The reference links I used in finding this out and compiling it in to this post are:</p>
<p><a href="http://www.autisticcuckoo.net/archive.php?id=2004/11/03/content-negotiation">http://www.autisticcuckoo.net/archive.php?id=2004/11/03/content-negotiation</a><br />
<a href="http://juicystudio.com/article/content-negotiation.php#php">http://juicystudio.com/article/content-negotiation.php#php</a><br />
<a href="http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html">http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html</a><br />
<a href="http://www.schillmania.com/content/entries/2004/10/24/application-xhtml+xml/">http://www.schillmania.com/content/entries/2004/10/24/application-xhtml+xml/</a><br />
<a href="http://blogs.msdn.com/ie/archive/2005/09/15/467901.aspx">http://blogs.msdn.com/ie/archive/2005/09/15/467901.aspx</a><br />
<a href="http://www.hixie.ch/advocacy/xhtml">http://www.hixie.ch/advocacy/xhtml</a><br />
<a href="http://www.workingwith.me.uk/articles/scripting/mimetypes">http://www.workingwith.me.uk/articles/scripting/mimetypes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.southplattewebdesign.com/2007/09/27/xhtml-php-validation-and-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glassy Goodness Barebone Template Released For Sale</title>
		<link>http://www.southplattewebdesign.com/2007/06/15/glassy-goodness-barebone-template-released-for-sale/</link>
		<comments>http://www.southplattewebdesign.com/2007/06/15/glassy-goodness-barebone-template-released-for-sale/#comments</comments>
		<pubDate>Fri, 15 Jun 2007 09:15:08 +0000</pubDate>
		<dc:creator>Billy</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Templates For Sale]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.southplattewebdesign.com/2007/06/15/glassy-goodness-barebone-template-released-for-sale/</guid>
		<description><![CDATA[I have released the barebones Glassy Goodness Web Template for sale as of today for only $4.95, the full template will cost at leastÂ $9.95 or more, which is still a great bargain for a professionally designed template that is 100% Validated XHTML and 100% Validated CSS layout (NO TABLES!!). If you feel generous and like [...]]]></description>
			<content:encoded><![CDATA[<p>I have released the barebones Glassy Goodness Web Template for sale as of today for only $4.95, the full template will cost at leastÂ $9.95 or more, which is still a great bargain for a professionally designed template that is 100% Validated XHTML and 100% Validated CSS layout (NO TABLES!!).</p>
<p>If you feel generous and like the template, go ahead and click to buy</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="image" alt="Make payments with PayPal - it's fast, free and secure!" src="https://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" /> <img height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" border="0" /><br />
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHbwYJKoZIhvcNAQcEoIIHYDCCB1wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCoKgeW25GkuOmSSrv9Ggfhk8UwX0iJ0r/jBsyhDUgemG0jRaGM3plbuUduZAUQItKFiwoRfbHrHA5nFVPSiLXVxbteyEWtkqsgVlm4XCrdvwpXj7PAggCHaQdZTsuwS5bU9vO53APhT5N+agat5dnbhsgE2jctOTWKDXUKRMTZsjELMAkGBSsOAwIaBQAwgewGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI8yeJ0Jev6gWAgchq3HVHRGPPLJ1cN3/3DpQCs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TEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA3MDgyODE3MzQwNVowIwYJKoZIhvcNAQkEMRYEFEo3pu2TeegY/YBQDa6dqiHA9xt3MA0GCSqGSIb3DQEBAQUABIGAIBSimE5rIVz/CLxYCYHIO4HR+PgyGHPvLZoSdaTTI7gi9ajwd47CkzEZ2Q1HIjPORpnfVlicaPkM6nsdgFQE/yyq0pupqm6QBx9hp5a3q1WyCwUga835whuV9CWqBF24nu6B8WfZIqX3EFiofLsMfAUqaESFGfSlaRD8hIiR5p0=-----END PKCS7-----  " /> </form>
<p>Thanks in advance for your support of reading SPWD, and reading the tutorials and in the event that you purchase something through us, we thank-you even more.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-7075532492661516";
google_ad_slot = "5786058018";
google_ad_width = 300;
google_ad_height = 250;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.southplattewebdesign.com/2007/06/15/glassy-goodness-barebone-template-released-for-sale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorials Coming Along</title>
		<link>http://www.southplattewebdesign.com/2007/02/01/tutorials-coming-along/</link>
		<comments>http://www.southplattewebdesign.com/2007/02/01/tutorials-coming-along/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 16:44:00 +0000</pubDate>
		<dc:creator>Billy</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Fireworks]]></category>
		<category><![CDATA[Graphic Design]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.southplattewebdesign.com/2007/02/01/tutorials-coming-along/</guid>
		<description><![CDATA[In the next few weeks I will be starting to post the first series of tutorials.Â  I have been working on the following tutorials: Fireworks: Creating Smooth Lines &#8211; An approach to creating curved lines in square/rectangle spaces. PHP: Creating effective user login control. Dreamweaver: Effective use of built-in tools for site maintenance. CSS: Add [...]]]></description>
			<content:encoded><![CDATA[<p>In the next few weeks I will be starting to post the first series of tutorials.Â  I have been working on the following tutorials:</p>
<p>Fireworks: Creating Smooth Lines &#8211; An approach to creating curved lines in square/rectangle spaces.</p>
<p>PHP: Creating effective user login control.</p>
<p>Dreamweaver: Effective use of built-in tools for site maintenance.</p>
<p>CSS: Add some style to a boring page.</p>
<p>As I progress, the tutorials may or may not follow a pattern, such as tutorial 2 in Fireworks may or may not be an extension or addition to tutorial 1.Â  If there are connecting tutorials, they will be linked accordingly for ease of use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.southplattewebdesign.com/2007/02/01/tutorials-coming-along/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

