<?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>gHacks technology news &#187; css</title>
	<atom:link href="http://www.ghacks.net/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Mon, 23 Nov 2009 14:06:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to style your page using CSS</title>
		<link>http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/</link>
		<comments>http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 16:44:08 +0000</pubDate>
		<dc:creator>Daniel Pataki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=11400</guid>
		<description><![CDATA[Beginner article coming up, it&#8217;s time to get to know the wonderful world of CSS! Cascading Style Sheets, or css, is the standard method of styling a webpage. In fact, you should have no styling in HTML whatsoever. HTML was not designed to be a presentation language, it&#8217;s more of a structural-semantic language. In other [...]]]></description>
			<content:encoded><![CDATA[<p>Beginner article coming up, it&#8217;s time to get to know the wonderful world of CSS! Cascading Style Sheets, or css, is the standard method of styling a webpage. In fact, you should have no styling in HTML whatsoever. HTML was not designed to be a presentation language, it&#8217;s more of a structural-semantic language. In other words, HTML should give your content structurem while CSS should control the actual presentation.</p>
<p>It&#8217;s a bit difficult to describe this all in one article, but CSS is actually not that hard to get into. Basically, your HTML code has three types of &#8220;hooks&#8221;. You probably already know one of them, this is your common, everyday tag. You can also give a unique ID to any element, or a class, which can be applied to any amount of elements. CSS can grab on to these &#8220;hooks&#8221; (this is not a technical term), and style the element you are refering to.</p>
<p>Let&#8217;s take a side-step and look at how to implement CSS first. Right now let&#8217;s just use the following syntax inside the file, in the header section (there are many other ways, you can also call CSS from an external file) &#8220;<em>&lt;style type=&#8221;text/css&#8221;&gt; &lt;/style&gt;</em>&#8220;. You can write your CSS code in between the start and end tag. CSS code is also very simple syntax wise. You have to specify a selector, and then some properties and values. The selector will be one of those &#8220;hooks&#8221; we looked at, it will let you specify what you want to change the style of. The property will let you specify what property of that element you want to change (text size, color, etc), and the value will specify what you want to change it to. The correct syntax is &#8220;<strong>selector {property:value; property:value}</strong>&#8221;<br />
<span id="more-11400"></span><br />
With that knowledge safely in our head, let&#8217;s take a more detailed look at our &#8220;hooks&#8221;, which will become our selectors. As I said, a tag can be a hook. Say you want the color of the font in all paragraphs to be orange. You can do this by applying the following CSS code: &#8220;<em>p {color:#ff9900;}</em>&#8220;. The selector is &#8220;p&#8221; the actual tag in html, the property is &#8220;color&#8221;, which controls text color, and the value is &#8220;#ff9900&#8243; which is a color code. You could also write &#8220;orange&#8221;, but color codes give you more control (more on this in another article).</p>
<p>That&#8217;s not too hard is it? Ok, so now all our paragraph&#8217;s have orange text color, but what if we want one to be different? You could put them in a div instead of a paragraph, since we only specified that paragraphs should have orange text. This is a very bad approach, but it does display how CSS works. You should not do this for many reasons, first of all because you loose some semantics, that piece of text is a paragraph, so should be in a paragraph tag.  Second of all, with this approach you will very quickly run out of tags to use. So in this case we apply the other &#8220;hooks&#8221;, we can specify a unique id, or a class. Let&#8217;s apply an id, since we just want a change for this one paragraph.</p>
<p>In your HTML the id is applied as an attribute to the tag like so: &#8220;<em>&lt;p id=&#8221;example&#8221;&gt;</em>&#8220;. What the actual id is, is not important, but try not to start it with a number, and don&#8217;t have special characters in it a lot (underscore is fine). We can use the id in our CSS code by applying the following in addition to the rule we already have: &#8220;<em>p#example {color:black;}</em>&#8220;. The selector now points specifically to that one paragraph, where we have specified the id &#8220;example&#8221;.</p>
<p>If we would have applied a class we would have &#8220;<em>&lt;p class=&#8221;example&#8221;&gt;</em>&#8221; in our HTML and &#8220;<em>p.example {color:black;}</em>&#8220;. If you try it out, you can see that there is no difference. The difference is in the fact that id should only be applied to one element only, while class can be applied to as many as you like. You can apply it to a paragraph and a div for example. In this case you could write the following: &#8220;<em>p.example {color:black;}</em> <em>div.example {color:black;}</em>&#8220;. This would tell each paragraph and each div with the class of &#8220;example&#8221; to have a text color of black. There is a simpler way to do this though, you can just specify the class, like so:  &#8220;<em>.example {color:black;}</em>&#8220;. This shows how you should &#8220;read&#8221; the code. Whenever you see just a class you should read it as &#8220;change the text color of <strong>all elements</strong> with this class to black&#8221;. If you see a tag or even another id or class in front you should read it as (in case of a paragraph) &#8220;change the text color of <strong>all paragraphs</strong> with this class to black&#8221;.</p>
<p>Those are the very basics of CSS, you might find a <a title="css properties" href="http://htmlhelp.com/reference/css/properties.html">list of properties</a> helpful, but there are many resources on the web to learn more about CSS, but I will be back with more info, and you can start reading <a href="http://scriptastique.com">Scriptastique</a> for more info on CSS.</p>
<p>&lt;img class=&#8221;alignleft size-full wp-image-10878&#8243; src=&#8221;http://www.ghacks.net/wp-content/uploads/2009/03/scrip_twitter.gif&#8221; alt=&#8221;Script&#8221; width=&#8221;53&#8243; height=&#8221;53&#8243; /&gt;&lt;strong&gt;If you&#8217;d like to read some similar articles, take a look at &lt;a title=&#8221;Web development blog&#8221; href=&#8221;http://scriptastique.com&#8221;&gt;Scriptastique&lt;/a&gt;, a blog all about web development and coding, with great tips on CSS, HTML, PHP, MySQL and Javasctipt and tutorials and screencasts coming soon! You can follow us on our &lt;a title=&#8221;Scriptastique RSS feed&#8221; href=&#8221;http://feeds2.feedburner.com/scriptastique&#8221;&gt;RSS feed&lt;/a&gt;, or &lt;a title=&#8221;Scriptastique on Twitter&#8221; href=&#8221;http://twitter.com/scriptastique&#8221;&gt;Twitter&lt;/a&gt; and &lt;a title=&#8221;Scriptastique on Facebook&#8221; href=&#8221;http://www.facebook.com/home.php?#/profile.php?id=1470106953&amp;amp;ref=profile&#8221;&gt;Facebook&lt;/a&gt;! &lt;/strong&gt;</p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/html/" title="html" rel="tag">html</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/09/11/create-wordpress-themes/" title="Create WordPress Themes (September 11, 2008)">Create WordPress Themes</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/06/14/an-easy-way-to-learn-web-design/" title="An easy way to learn web design (June 14, 2008)">An easy way to learn web design</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/08/30/xml-escape-tool/" title="XML Escape Tool (August 30, 2009)">XML Escape Tool</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Identifying each page using body tags and CSS</title>
		<link>http://www.ghacks.net/2009/03/11/identifying-each-page-using-body-tags-and-css/</link>
		<comments>http://www.ghacks.net/2009/03/11/identifying-each-page-using-body-tags-and-css/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 18:00:51 +0000</pubDate>
		<dc:creator>Daniel Pataki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[superglobal]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=11106</guid>
		<description><![CDATA[If you are building a large website, chances are you have a great little CSS stylesheet linked to every document which governs all the pages. But what do you do if you want just one of the pages to be completely different? You could of course go into your code and ad separate id-s and [...]]]></description>
			<content:encoded><![CDATA[<p>If you are building a large website, chances are you have a great little CSS stylesheet linked to every document which governs all the pages. But what do you do if you want just one of the pages to be completely different? You could of course go into your code and ad separate id-s and classes for specific elements, but I use a bit of an easier approach.</p>
<p>The basis of this is to use php code to determine the directory of the page you are viewing and also the page&#8217;s name itself. I will show you the code in a second, but let&#8217;s say you have a social network site underway and you keep you messaging system (outbox, inbox, new message, etc.) in a folder named &#8220;messaging&#8221;. In this case you can grab the name of the directory and the page and assign these as an id and a class to the body tag automatically, so it would look like this for the inbox: <em>&lt;body class=&#8221;messaging&#8221; id=&#8221;inbox&#8221;&gt;</em>.</p>
<p>This will make it very easy to add new rules in your stylesheet, since you can refer to whole documents in a directory using <strong>&#8220;body.messaging&#8221;</strong> and you can refer to specific pages using<strong> &#8220;body#inbox&#8221;</strong>. You can now use the same CSS file to change the look of only one page without the need to go in and add new classes and ids all the time. So how about the code to grab the directory and the page? Let&#8217;s take a look!</p>
<p><span id="more-11106"></span></p>
<p>First of all, let&#8217;s determine the page. For this we will use the <strong>&#8220;$_SERVER&#8221;</strong> superglobal variable which stores a lot of valuable information about the page you are viewing, the IP viewing the page and so on. Here&#8217;s the code as is, with the explanation coming up afterward.</p>
<pre>function page()
{
$page = substr(strrchr($_SERVER['PHP_SELF'],'/'),1,-4);
return $page;
}</pre>
<p>As you can see this is a function because I use it a lot throughout the site, not just for this one purpose. <strong>&#8220;$_SERVER['PHP_SELF']&#8220;</strong> will return the path to the file with the filename from your root directory, so it will look something either like this: <strong>&#8220;/directory/subdirectory/file.php&#8221;</strong> or if the file is in the root directory it will simply be <strong>&#8220;/file.php&#8221;</strong>. To get only the filename we want to chop off all the bits before the slash (and the slash itself), and also chop off the file extension.</p>
<p>As you can see the first thing I did was to chop off everything before the last slash using <strong>&#8220;strrchr()&#8221;</strong> which returns the part of the string after the last occurrence of the sub-string you specify. However, the last slash still remains, but this is not a problem, we can get rid of this, and the &#8220;.php&#8221; part in one go.</p>
<p>This is done by using <strong>&#8220;substr()&#8221;</strong>. The function took three arguments, the string we want to work with, and two integers. The first integer tells the function to start from character 1 (this means everything before that will be chopped off, in this case character 0, which is the slash) and then return everything up to the -4th character from the end. This means that four characters will be dropped from the end.</p>
<p>Now the variable <strong>&#8220;$page&#8221;</strong> contains only the readable part of the filename which would be &#8220;inbox&#8221; or &#8220;index&#8221;, without any slashes or the extension. You could also create this as a variable without using function. the reason I use a function is that I usually have some extra code in there which allows me to echo the function at once by default, but also to store it as a variable if needed.</p>
<p>Now, let&#8217;s take a look at determining the directory. We could take the same approach as before but chop off different bits, but PHP already has a function which will make our life easier, let&#8217;s take a look at the code:</p>
<pre>function thedir()
{
$dir = substr(strrchr(getcwd(), '/'),1);
return $dir;
}</pre>
<p>Using <strong>&#8220;getcwd()&#8221;</strong> we can get the current working directory. This will be in the form of <strong>&#8220;/directory/subdirectory&#8221;</strong>, so all we need to do is return everything after the last slash and chop the last slash off. We use the same technique as before, so now we also have our directory. Once done, all you need to do is modify your header, which should be in a PHP file to make the body tag look like this (calling the functions as the names for the class and id):</p>
<pre>&lt;body id="&lt;?php echo page() ?&gt; class="&lt;?php echo $thedir ?&gt;""&gt;</pre>
<p>There are some other ways to do this, some can be simpler or more complicated, this is more like the proving of a point, but it is totally usable and I use a modified version of it throughout my sites. This is not a whole lot of code extra and will make your site better structured and easier to modify.</p>
<p>Please be aware that<strong> &#8220;getcwd()&#8221;</strong> can give you some weird results if you changed your current working directory somewhere in your code. In this case you can use a modified version of the &#8216;page getting&#8217; code, or you can take a look at the <a href="http://hu.php.net/reserved.variables.server">server superglobal</a> section in the PHP manual for some more help.</p>
<p><img class="alignleft size-full wp-image-10878" src="http://www.ghacks.net/wp-content/uploads/2009/03/scrip_twitter.gif" alt="Script" width="53" height="53" /><strong>If you&#8217;d like to read some similar articles, take a look at <a title="Web development blog" href="http://scriptastique.com">Scriptastique</a>, a blog all about web development and coding, with great tips on CSS, HTML, PHP, MySQL and Javasctipt and tutorials and screencasts coming soon! You can follow us on our <a title="Scriptastique RSS feed" href="http://feeds2.feedburner.com/scriptastique">RSS feed</a>, or <a title="Scriptastique on Twitter" href="http://twitter.com/scriptastique">Twitter</a> and <a title="Scriptastique on Facebook" href="http://www.facebook.com/home.php?#/profile.php?id=1470106953&amp;ref=profile">Facebook</a>! </strong></p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/superglobal/" title="superglobal" rel="tag">superglobal</a>, <a href="http://www.ghacks.net/tag/web-development/" title="web development" rel="tag">web development</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/03/16/web-development-roundup/" title="Web development roundup (March 16, 2009)">Web development roundup</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/" title="Scriptastique web development roundup (March 9, 2009)">Scriptastique web development roundup</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/04/09/how-to-show-5-top-categories-in-wordpress/" title="How to show 5 top categories in Wordpress (April 9, 2009)">How to show 5 top categories in Wordpress</a> (9)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/03/11/identifying-each-page-using-body-tags-and-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; what it does and what it doesn&#8217;t</title>
		<link>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/</link>
		<comments>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 19:28:22 +0000</pubDate>
		<dc:creator>Jeremiah</dc:creator>
				<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website development]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=10600</guid>
		<description><![CDATA[PHP is a Server side scripting language. Its primary competitors are ASP (Microsoft), JSP (Sun), CFM (Adobe), and Perl (often called cgi by hosting companies, although it is not the only cgi language).
PHP was originally created in 1995, so as a technology it is fairly mature. Version 5.x is the latest stable version and 6 [...]]]></description>
			<content:encoded><![CDATA[<p>PHP is a Server side scripting language. Its primary competitors are ASP (Microsoft), JSP (Sun), CFM (Adobe), and Perl (often called cgi by hosting companies, although it is not the only cgi language).<br />
PHP was originally created in 1995, so as a technology it is fairly mature. Version 5.x is the latest stable version and 6 is under development. It is currently running almost 20 million websites including big names like <a href="http://www.ghacks.net/2009/10/17/facebook-login/">Facebook</a>.</p>
<p>The most common server architecture on which PHP is found is called LAMP (for Linux + Apache + MySQL + PHP). All of the elements of LAMP are open source, meaning that the source code of the application is freely available. This means that the cost of setting up a server running LAMP is reduced (No License Fees), so LAMP based web hosting tends to be the least expensive solution available.</p>
<p>The Internet is built on a client-server architecture. On the client side we have the user and the browser. One the server side we have the server and its script interpreter (In our case, Apache and PHP).<br />
Because PHP runs on the server side, we cannot use it for flashy client side effects, things like animations and auto-complete cannot be performed by php because php is only running on the server. For client side programming we could use javascript, Flash/Flex, Silverlight, or JavaFX.</p>
<p><span id="more-10600"></span>What we can do with PHP is access a database, connect to other websites/services for information, and build a page out of smaller pieces, which we then deliver to the client for rendering.</p>
<p>I think it is important to indicate at this time that there are four levels at which you can work with PHP.</p>
<ol>
<li>Scripting &#8211; this is where you take a small script and add it (integrate) into an existing page.</li>
<li>Coding &#8211; this is where you write scripts as needed to add basic functionality to your site.</li>
<li>Development &#8211; this is where you write an full application in PHP.</li>
<li>Architect &#8211; this is where you properly design an application that develop it into an application. Like development but puts a lot more thought into a good foundation.</li>
</ol>
<p>Depending on your actual needs, several of these layers could be overkill for your task. The following articles will mainly be focused on the first two levels &#8211; scripting, and coding. In Scripting and coding we have two primary tasks we accomplish. One makes your job as webmaster easier. The second adds new functionality to your site.</p>
<p><a href="http://www.jeremiahstover.com">Jeremiah Stover</a> is a Software Engineer and a Business IT Consultant at <a href="http://www.pragmatic-development.com">Pragmatic Development</a>. He has hands on experience and regularly provides practical advice in Business, Marketing, IT equipment and software. His Specialties include interpersonal communications, design skills, teaching and instruction. Right now he spends most of his time developing web applications in PHP and MySQL.</p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/html/" title="html" rel="tag">html</a>, <a href="http://www.ghacks.net/tag/lamp/" title="LAMP" rel="tag">LAMP</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/web-dev/" title="web dev" rel="tag">web dev</a>, <a href="http://www.ghacks.net/tag/web-development/" title="web development" rel="tag">web development</a>, <a href="http://www.ghacks.net/tag/website-development/" title="website development" rel="tag">website development</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/02/ghacks-web-development-pdf-article-compilation-january-09/" title="Ghacks Web Development PDF Article Compilation January 09 (February 2, 2009)">Ghacks Web Development PDF Article Compilation January 09</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/01/31/web-development-html-playground/" title="Web Development: HTML Playground (January 31, 2009)">Web Development: HTML Playground</a> (7)</li>
	<li><a href="http://www.ghacks.net/2009/03/16/web-development-roundup/" title="Web development roundup (March 16, 2009)">Web development roundup</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/" title="Scriptastique web development roundup (March 9, 2009)">Scriptastique web development roundup</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web Development: PHP &#8211; what role does it fill</title>
		<link>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/</link>
		<comments>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 09:03:18 +0000</pubDate>
		<dc:creator>Jeremiah</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website development]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=10259</guid>
		<description><![CDATA[Before we try to work with PHP we need understand the role it fills â€“ what problem does it address. The World Wide Web is built on a client-server model.  A client computer requests a page which is supplied by a Web Server. The browser then renders the page for the user to view. [...]]]></description>
			<content:encoded><![CDATA[<p>Before we try to work with PHP we need understand the role it fills â€“ what problem does it address. The World Wide Web is built on a client-server model.  A client computer requests a page which is supplied by a Web Server. The browser then renders the page for the user to view. The simplest type of pages contain static (unchanging) content. The server could serve plain text files, and the browser wouldn&#8217;t have any trouble rendering them. </p>
<p>HTML is a markup language that lets us describe attributes of the text and blocks on our pages. This works great for simple requests, making pages much more interesting than plain text. However it leaves us with a very simple structure. One page from One url (address) results in one rendered content (every time this url is requested, the output is the same).</p>
<p>To give us more options we have programming languages. Some like PHP run on the server side. They modify the content that will be displayed before it is sent to the client and on to the browser. Others like JavaScript run on the client side and allow changes to be made in the browser after the page has been rendered â€“ usually for interactivity or for adding a feature not normally available in that browser.</p>
<p><span id="more-10259"></span>The very first thing you _must_ do before getting started with PHP is get a good grasp of HTML (and CSS). Many webmasters use a tool like Dreamweaver, Expression Web or KompoZer. To<br />
work with PHP it is important that you understand the underlying HTML code. You will be modifying this code so you need to be able to understand the HTML well enough to understand what you see.</p>
<p>If you like video training try Lynda.com or VTC.com. If you prefer reading a book try &#8220;Head First html with CSS &#038; Xhtml&#8221; or if you prefer free web instruction try <a href="http://w3schools.com">w3schools.com</a> and <a href="http://tizag.com">tizag.com</a>.</p>
<p>Now that you understand the markup language which is what is sent to the browser (HTML) you are ready to tackle the server side use of PHP.</p>
<p>Jeremiah Stover is a Software Developer at <a href="http://www.pragmatic-development.com/">Pragmatic Development</a>. He specializes in client communications. While PD does offer a full range of IT services and consulting, they are currently specializing in website development in PHP/MySQL.</p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/html/" title="html" rel="tag">html</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/web-dev/" title="web dev" rel="tag">web dev</a>, <a href="http://www.ghacks.net/tag/web-development/" title="web development" rel="tag">web development</a>, <a href="http://www.ghacks.net/tag/website-development/" title="website development" rel="tag">website development</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/02/02/ghacks-web-development-pdf-article-compilation-january-09/" title="Ghacks Web Development PDF Article Compilation January 09 (February 2, 2009)">Ghacks Web Development PDF Article Compilation January 09</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/01/31/web-development-html-playground/" title="Web Development: HTML Playground (January 31, 2009)">Web Development: HTML Playground</a> (7)</li>
	<li><a href="http://www.ghacks.net/2009/03/16/web-development-roundup/" title="Web development roundup (March 16, 2009)">Web development roundup</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/" title="Scriptastique web development roundup (March 9, 2009)">Scriptastique web development roundup</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using javascript to hide and unhide elements dynamically</title>
		<link>http://www.ghacks.net/2009/01/15/using-javascript-to-hide-and-unhide-elements-dynamically/</link>
		<comments>http://www.ghacks.net/2009/01/15/using-javascript-to-hide-and-unhide-elements-dynamically/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 01:29:15 +0000</pubDate>
		<dc:creator>Daniel Pataki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=9899</guid>
		<description><![CDATA[My favorite aspect of javascript is that it enables you to add great features to your site like showing/hiding parts of it when a user clicks a link without reloading, get some data from a database and displaying it in a new div, again without reloading. In fact, it would be possible (although not very [...]]]></description>
			<content:encoded><![CDATA[<p>My favorite aspect of javascript is that it enables you to add great features to your site like showing/hiding parts of it when a user clicks a link without reloading, get some data from a database and displaying it in a new div, again without reloading. In fact, it would be possible (although not very comfortable and easily codeable) to create a big website, like a Wordpress blog without any reloading at all, no matter where you click.</p>
<p>This is usually referred to as AJAX, although most of it is javascript and HTML, and it is actually easier than it seems. In my opinion calling the hiding and showing of elements is not yet AJAX, because in my eyes ture AJAX communicates with the server in the background. We will only be changing CSS properties and element contents with javascript in this post to achieve our goal.</p>
<p>Let&#8217;s say you&#8217;re creating a form, and you want a way to explain what the fields do or what data they need to contain, but you don&#8217;t want to fill up too much space on screen, and you want to make it as unobtrusive as possible. In this case it would be cool to have a link with the anchortext &#8220;Explain&#8221;, which would expand a section which explains what the user needs to do.</p>
<p><span id="more-9899"></span></p>
<p>As the first step, we need to create a div which will hold the explanation text, and a link which will unhide it for the user.<br />
<code><br />
&lt;a id="link1" href="javascript:display('show', 1)"&gt;Explain&lt;/a&gt;<br />
&lt;div id="explanation1" style="display:none"&gt;This form let's you input your order details, please keep it short!&lt;/div&gt;<br />
</code></p>
<p>As you can see I have given the div a unique identifier. This is needed so the javascript knows which div I want to change. I have added a number to the id because there might be many more explanations, these would receive different numbers. I have also given the link an id, with the same number at the end as the div. Once the user clicked the link, we want to change the link, so clicking it again will close the div. </p>
<p>The link contains &#8220;javascript:&#8221;, which indicates that this link doesn&#8217;t point to a page, but should execute javascript code, in our case a function (display), with two arguments. The first tells the javascript function which will execute that we want to show the div (as opposed to hiding it), the second is a numerical identifier, which should be the same as the number in the div&#8217;s id. Take a look at the javascript code below with the explanation afterwards. </p>
<p><code><br />
&lt;script type="text/javascript"&gt;<br />
<br />
function display(action, id)<br />
{<br />
	if (action == 'show')<br />
	{<br />
	document.getElementById("explanation"+id).style.display = "block";<br />
	document.getElementById("link"+id).href= "javascript:display('hide', "+id+")";<br />
	document.getElementById("link"+id).innerHTML = "Close";<br />
	}<br />
<br />
	if (action == 'hide')<br />
	{<br />
	document.getElementById("explanation"+id).style.display = "none";<br />
	document.getElementById("link"+id).href= "javascript:display('show', "+id+")";<br />
	document.getElementById("link"+id).innerHTML = "Explain";<br />
	}<br />
}<br />
<br />
&lt;/script&gt;<br />
</code></p>
<p>As you can see, the two arguments are named &#8220;action&#8221; and &#8220;id&#8221;. The action argument will tell the script what we want to do (close the div or show it), the id argument will tell it which element we want to do it with. When you first click on the link the action is &#8220;show&#8221;, so let&#8217;s take a look at what&#8217;s happening there.</p>
<p>First of all, the script checks what the action is. It sees that it is &#8220;show&#8221;, so it executes three lines. the first line sets the div&#8217;s dispaly to block, which means that it will appear, you will be able to read the text. this is achieved by &#8220;grabbing&#8221; the element using its unique id. By specifying &#8220;document.getElementById(&#8217;theidhere&#8217;)&#8221; you can grab any element. In our case, we always grab the element &#8220;explanationX&#8221;, where X is the number beside it, given by the id argument. This id argument makes it possible to use one function for all the divs you want to open or close, so we won&#8217;t need to code the same function for all the different ids out there. The bit of code following specifies that we want to change the style, more specifically the display property, and we want to change it to &#8220;block&#8221;. </p>
<p>The second line grabs the link element, and instead of changing the style, it changes the address it points to (href), which in our case will be a new piece of javascript code. We change it to the exact same code, but instead of &#8220;show&#8221; as the action, we now have hide. </p>
<p>Line 3 grabs the same link element, but now changes the element contents. An element&#8217;s contents is always whatever is between the start and end tag, in a link&#8217;s case this is the anchor text. We change it from &#8220;Explain&#8221; to &#8220;Close&#8221; so the user knows that the div will disappear if he clicks the link again. </p>
<p>The three lines in case the action is &#8220;hide&#8221; do the exact same things, but change the values back, so if the user wants to open the div again he can do so. </p>
<p>That wasn&#8217;t so hard was it? The uses for these javascript methods are truly endless, from checking registration forms before submitting, to dynamically adding text to your site, you can do almost anything here, your imagination is truly the limit, so have fun!</p>

	Tags: <a href="http://www.ghacks.net/tag/ajax/" title="ajax" rel="tag">ajax</a>, <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/08/19/view-javascript-sources-with-jsview/" title="View Javascript Sources with JSView (August 19, 2008)">View Javascript Sources with JSView</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/11/07/remove-adverts-on-wikipedia/" title="Remove adverts on Wikipedia (November 7, 2008)">Remove adverts on Wikipedia</a> (3)</li>
	<li><a href="http://www.ghacks.net/2007/09/30/preezo-create-powerpoint-presentations-online/" title="Preezo: Create Powerpoint Presentations Online (September 30, 2007)">Preezo: Create Powerpoint Presentations Online</a> (12)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/01/15/using-javascript-to-hide-and-unhide-elements-dynamically/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Remove adverts on Wikipedia</title>
		<link>http://www.ghacks.net/2008/11/07/remove-adverts-on-wikipedia/</link>
		<comments>http://www.ghacks.net/2008/11/07/remove-adverts-on-wikipedia/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 20:11:58 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Browsing]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[adverts]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=8134</guid>
		<description><![CDATA[Wikipedia are currently having their annual fundraising drive and consequently a large &#8216;encouragement&#8217; to donate appears on every single encyclopedia article, which is an annoyance.
Whilst it is possible to &#8216;collapse&#8217; the advertisement to a much smaller one, having to do so is about as big an annoyance as the original advertisement.
A popular Wikimedia-themed newsletter, Wikizine, [...]]]></description>
			<content:encoded><![CDATA[<p>Wikipedia are currently having their annual fundraising drive and consequently a large &#8216;encouragement&#8217; to donate appears on every single encyclopedia article, which is an annoyance.</p>
<p>Whilst it is possible to &#8216;collapse&#8217; the advertisement to a much smaller one, having to do so is about as big an annoyance as the original advertisement.</p>
<p>A popular Wikimedia-themed newsletter, Wikizine, <a href="http://en.wikizine.org/2008/11/year-2008-week-45-number-101-tech-flash.html">pointed out that by modifying the theme</a>, it is possible to remove it.</p>
<p><span id="more-8134"></span>All registered users can edit two files which modify CSS and JavaScript on Wikipedia for them. By default, the monobook theme is used and to my knowledge, this will only under that theme.</p>
<p>To remove the advert, ensure you are logged in, then go to <a href="http://en.wikipedia.org/wiki/Special:mypage/monobook.css">Special:mypage/monobook.css</a>. Go to &#8216;edit this page&#8217; and paste the following:</p>
<p><code>/* Remove fundraiser banner and sitenotice */<br />
#siteNotice, #fundraiser, .fundraiser-box { display:none; !important; }</code></p>
<p>Save the page and then do a hard refresh (Ctrl+F5). The advert should be gone!</p>
<p>Wikimedia obviously requires money in order to operate and they massively value donations, but I find begging for money in such an obtrustive fashion very annoying and it really makes Wikipedia less easy to use.</p>

	Tags: <a href="http://www.ghacks.net/tag/adverts/" title="adverts" rel="tag">adverts</a>, <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/wikipedia/" title="wikipedia" rel="tag">wikipedia</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/08/04/wikitaxi-takes-wikipedia-offline/" title="WikiTaxi Takes Wikipedia Offline (August 4, 2008)">WikiTaxi Takes Wikipedia Offline</a> (7)</li>
	<li><a href="http://www.ghacks.net/2007/01/10/wikipedia-on-your-ipod/" title="Wikipedia on your iPod (January 10, 2007)">Wikipedia on your iPod</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/27/wikipedia-gets-books-and-gets-printed/" title="Wikipedia gets books and gets printed (February 27, 2009)">Wikipedia gets books and gets printed</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/09/03/wikilook-displays-dictionary-word-definitions-without-leaving-the-website/" title="WikiLook Displays Dictionary Word Definitions Without Leaving The Website (September 3, 2009)">WikiLook Displays Dictionary Word Definitions Without Leaving The Website</a> (3)</li>
	<li><a href="http://www.ghacks.net/2008/01/07/wikia-search-alpha-launches/" title="Wikia Search Alpha launches (January 7, 2008)">Wikia Search Alpha launches</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/11/07/remove-adverts-on-wikipedia/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create WordPress Themes</title>
		<link>http://www.ghacks.net/2008/09/11/create-wordpress-themes/</link>
		<comments>http://www.ghacks.net/2008/09/11/create-wordpress-themes/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 03:15:16 +0000</pubDate>
		<dc:creator>joshua</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2008/09/11/create-wordpress-themes/</guid>
		<description><![CDATA[
WordPress is fantastic for the extend to which is can be customised, however if mucking around with CSS isnâ€™t something you really want to get into personally then here are a few tools to help you out:
Artisteer 
Artisteer is a new application fresh out of beta which helps you design either normal websites or a [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>WordPress is fantastic for the extend to which is can be customised, however if mucking around with CSS isnâ€™t something you really want to get into personally then here are a few tools to help you out:</p>
<p><strong>Artisteer</strong> </p>
<p><a href="http://www.artisteer.com/Default.aspx?HK=FB48-6F8A-8F1C-9FA0-6E6A&amp;p=purchase">Artisteer</a> is a new application fresh out of beta which helps you design either normal websites or a WordPress theme. Itâ€™s also one of the few programs Iâ€™ve seen which uses the Office Ribbon UI, it works pretty effectively for this application and looks great as well.</p>
<p>The problem is that this isnâ€™t freeware and costs $99.95 for a developer license. Considering the lack of advanced features in the software, however nice it looks, I canâ€™t see many people jumping at the chance to purchase this.</p>
<p>Perhaps if it included an actual code editor as well or had a great deal more options for customisation then it would be a more attractive offer but till then I think not. If you use the free version all images are watermarked when you export your theme, however this could still be useful as you can simply replace the images in the files.</p>
<p>I can only assume the activation of Artisteer provides a lot more functionality such as more templates, support for more platforms and more options.</p>
<p> <span id="more-6924"></span>
<p><a href="http://www.wordpressthemegen.com/"><strong>WordPress Theme Generator</strong></a></p>
<p>Feels kind of dated compared to Artisteer but will do the basics of theme design for you, handy if you want something to work off but not much more than that.</p>
<p><a href="http://elliotjaystocks.com/blog/archive/2008/free-starkers-wordpress-theme/">Starkers WordPress Theme</a></p>
</p>
<p>I particularly like this. If youâ€™ve ever started a new theme based off the default WordPress themes then youâ€™ll have realised how much stuff is in there which you really donâ€™t need. Naked WordPress theme is a completely stripped down theme for you to work off, really helpful =)</p>
<p>Thereâ€™s an update saying it isnâ€™t working too well with WP 2.6, but that the author is updating it soon =)</p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/generator/" title="generator" rel="tag">generator</a>, <a href="http://www.ghacks.net/tag/html/" title="html" rel="tag">html</a>, <a href="http://www.ghacks.net/tag/wordpress/" title="wordpress" rel="tag">wordpress</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/01/08/web-development-how-does-php-work/" title="Web Development: How does PHP work? (January 8, 2009)">Web Development: How does PHP work?</a> (21)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/" title="How to style your page using CSS (March 23, 2009)">How to style your page using CSS</a> (0)</li>
	<li><a href="http://www.ghacks.net/2008/06/14/an-easy-way-to-learn-web-design/" title="An easy way to learn web design (June 14, 2008)">An easy way to learn web design</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/09/11/create-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>View Javascript Sources with JSView</title>
		<link>http://www.ghacks.net/2008/08/19/view-javascript-sources-with-jsview/</link>
		<comments>http://www.ghacks.net/2008/08/19/view-javascript-sources-with-jsview/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 13:05:26 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox-add on]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[stylesheets]]></category>
		<category><![CDATA[web designer]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=6287</guid>
		<description><![CDATA[Viewing the source code of a website is a standard function in all web browsers. A right-click usually opens a menu with the option to view the source code of the page. Source code only refers to html source code. There is no way to view Javascript or CSS source codes directly from those menus.
The [...]]]></description>
			<content:encoded><![CDATA[<p>Viewing the source code of a website is a standard function in all web browsers. A right-click usually opens a menu with the option to view the source code of the page. Source code only refers to html source code. There is no way to view Javascript or CSS source codes directly from those menus.</p>
<p>The <a href="http://www.ghacks.net/tag/firefox/">Firefox</a> add-on <a href="https://addons.mozilla.org/en-US/firefox/addon/2076">JSView</a> adds that possibility to the Firefox browser. Installing the Firefox extension adds a new entry to the right-click menu which displays the amount of Javascript and CSS files that are referenced by the website.</p>
<p>Each file can be opened by selecting it. The source code of the selected file will be opened in the default source viewer of the browser. </p>
<p><span id="more-6287"></span><img src="http://www.ghacks.net/wp-content/uploads/2008/08/javascript_source_code.jpg" alt="javascript source code" title="javascript source code" width="409" height="246" class="alignnone size-medium wp-image-6288" /></p>
<p>The extension provides the option to view the source code of all Javascript or CSS files at once. The tool is especially useful for web designers.</p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/firefox/" title="firefox" rel="tag">firefox</a>, <a href="http://www.ghacks.net/tag/firefox-add-on/" title="firefox-add on" rel="tag">firefox-add on</a>, <a href="http://www.ghacks.net/tag/javascript/" title="javascript" rel="tag">javascript</a>, <a href="http://www.ghacks.net/tag/stylesheets/" title="stylesheets" rel="tag">stylesheets</a>, <a href="http://www.ghacks.net/tag/web-designer/" title="web designer" rel="tag">web designer</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/07/16/block-noscript-from-opening-homepage-after-update/" title="Block NoScript From Opening Homepage After Update (July 16, 2009)">Block NoScript From Opening Homepage After Update</a> (8)</li>
	<li><a href="http://www.ghacks.net/2008/12/25/youtube-video-download/" title="Youtube Video Download (December 25, 2008)">Youtube Video Download</a> (11)</li>
	<li><a href="http://www.ghacks.net/2009/04/29/youtube-it-firefox-add-on/" title="Youtube It Firefox Add-on (April 29, 2009)">Youtube It Firefox Add-on</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/04/11/youtube-comment-cloud-firefox-add-on/" title="Youtube Comment Cloud Firefox Add-On (April 11, 2009)">Youtube Comment Cloud Firefox Add-On</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/06/27/you-better-stop-using-internet-explorer-for-now/" title="You better stop using Internet Explorer for now (June 27, 2008)">You better stop using Internet Explorer for now</a> (18)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/08/19/view-javascript-sources-with-jsview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An easy way to learn web design</title>
		<link>http://www.ghacks.net/2008/06/14/an-easy-way-to-learn-web-design/</link>
		<comments>http://www.ghacks.net/2008/06/14/an-easy-way-to-learn-web-design/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 23:05:46 +0000</pubDate>
		<dc:creator>Daniel Pataki</dc:creator>
				<category><![CDATA[Knowledge]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=4979</guid>
		<description><![CDATA[I spent a little time today on a Wordpress theme for one of my clients. He asked me to copy his webpage design and turn it into a Wordpress blog. This took me about a fifth of the time it takes to design a blog on my own, and the coding was much smoother and [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a little time today on a Wordpress theme for one of my clients. He asked me to copy his webpage design and turn it into a Wordpress blog. This took me about a fifth of the time it takes to design a blog on my own, and the coding was much smoother and easier. I realized that this is a great exercise to start learning html and css.</p>
<p>In fact, I&#8217;m teaching my girlfriend css design and we went through the same process, taking an existing page and recreating it. First of all, you see the design right in front of you and you don&#8217;t need to keep in mind where you want to get to. Second of all, you can use some awesome tools to help you on the way if you&#8217;re a beginner.</p>
<p>My favorite tool is of course <a title="web developer toolbar for firefox" href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web developer toolbar</a>, which is a <a href="http://www.ghacks.net/tag/firefox/">Firefox</a> extension that can aid you in web design. A great trick to know is to press ctr+shift+y to view style sheet info on a page. This will draw a rectangle around elements you hover over, and when you click, it will display the styling behind those elements.</p>
<p><span id="more-4979"></span></p>
<p>This is awesome if you&#8217;re starting out because it&#8217;s a cheat sheet you can use to check how the designers did this or that, but you can also use it to take a look at what colors where used, how a float is accomplished and so on. There are also some other tools in there like changing the stylsheet on the fly, resizing the viewport and so on.</p>
<p>In short, copying a website is much easier than creating your own design. If you take the burden of trying to create something cool and new on your own off your back, you will be free to actually learn the methods behind coding a good site. My girlfriend also finds it very helpful, and she&#8217;s a complete css newbie, so I guess many people could find this method appealing, mosty because it puts you in the action right away, no need to go through all the boring theory.</p>

	Tags: <a href="http://www.ghacks.net/tag/coding/" title="coding" rel="tag">coding</a>, <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/html/" title="html" rel="tag">html</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/" title="Scriptastique web development roundup (March 9, 2009)">Scriptastique web development roundup</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/" title="How to style your page using CSS (March 23, 2009)">How to style your page using CSS</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/03/04/how-echo-works-in-php/" title="How echo works in PHP (March 4, 2009)">How echo works in PHP</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/06/14/an-easy-way-to-learn-web-design/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Check CSS Properties with Xray</title>
		<link>http://www.ghacks.net/2007/12/23/check-css-properties-with-xray/</link>
		<comments>http://www.ghacks.net/2007/12/23/check-css-properties-with-xray/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 11:08:54 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Browsing]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2007/12/23/check-css-properties-with-xray/</guid>
		<description><![CDATA[Xray is a bookmarklet that can be used in Firefox, Internet Explorer 6+ and Safari that displays CSS Properties of elements on a website. The process is as simple as it could be. The user loads a website, clicks on the Xray bookmarklet which loads an overlay that will display the information.]]></description>
			<content:encoded><![CDATA[<p><a href="http://westciv.com/xray/">Xray</a> is a bookmarklet that can be used in <a href="http://www.ghacks.net/tag/firefox/">Firefox</a>, <a href="http://www.ghacks.net/tag/internet-explorer/">Internet Explorer</a> 6+ and Safari that displays CSS Properties of elements on a website. The process is as simple as it could be. The user loads a website, clicks on the Xray bookmarklet which loads an overlay that will display the information.</p>
<p>Every click on an element displays the CSS properties for that element right on the screen. The element itself displays its width, height and position on the screen while the Xray box displays additional information such as margin, padding, position and border values.</p>
<p>This is in no way as powerful as the Firebug extension for Firefox but it can give a good quick overview over certain important CSS properties. I&#8217;m mentioning it here mainly because I think that it is astonishing that a simply bookmarklet could display such a wealth of information.</p>
<p><span id="more-2569"></span><img src='http://www.ghacks.net/wp-content/uploads/2007/12/xray.jpg' alt='xray' /></p>

	Tags: <a href="http://www.ghacks.net/tag/bookmarklet/" title="bookmarklet" rel="tag">bookmarklet</a>, <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/webmaster/" title="webmaster" rel="tag">webmaster</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/07/18/yahoo-server-monitor-widget/" title="Yahoo Server Monitor Widget (July 18, 2008)">Yahoo Server Monitor Widget</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/08/30/xml-escape-tool/" title="XML Escape Tool (August 30, 2009)">XML Escape Tool</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/07/24/wordpress-broken-link-checker/" title="Wordpress Broken Link Checker (July 24, 2009)">Wordpress Broken Link Checker</a> (5)</li>
	<li><a href="http://www.ghacks.net/2007/08/31/widgetize-you-website-with-yourminis/" title="Widgetize you website with Yourminis (August 31, 2007)">Widgetize you website with Yourminis</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/06/05/website-optimization-page-speed-for-firebug/" title="Website Optimization: Page Speed For Firebug (June 5, 2009)">Website Optimization: Page Speed For Firebug</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2007/12/23/check-css-properties-with-xray/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>DVDFab HD Decrypter</title>
		<link>http://www.ghacks.net/2007/08/14/dvdfab-hd-decrypter/</link>
		<comments>http://www.ghacks.net/2007/08/14/dvdfab-hd-decrypter/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 04:37:58 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Music and Video]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[aacs]]></category>
		<category><![CDATA[blue ray]]></category>
		<category><![CDATA[copy-protection]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dvdfab hd decrypter]]></category>
		<category><![CDATA[hd dvd]]></category>
		<category><![CDATA[rip dvd]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2007/08/14/dvdfab-hd-decrypter/</guid>
		<description><![CDATA[DVDFab HD Decrypter is a free DVD and HD ripper that is able to copy the contents of a movie onto your hard drive even if that movie is copy protected. It can remove DVD copy protections such as CSS, RC, RCE, APS, UOPs and Sony ARccOS and even manages to remove AACS from Blue-Ray and HD-DVD disks which means that it should be possible to copy most DVDs and HD DVDs that you have to your hard disk without running into copy protection problems.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dvdfab.com/free.htm">DVDFab HD Decrypter</a> is a free DVD and HD ripper that is able to copy the contents of a movie onto your hard drive even if that movie is copy protected. It can remove DVD copy protections such as CSS, RC, RCE, APS, UOPs and Sony ARccOS and even manages to remove AACS from Blue-Ray and HD-DVD disks which means that it should be possible to copy most DVDs and HD DVDs that you have to your hard disk without running into copy protection problems.</p>
<p>The only aspect that is a little bit confusing is the menu structure. Since this is basically a free version of DVDFab Gold and Platinum not all options are accessible in the main menu. It is only possible to rip the DVD or HD movie to your hard disk removing all copy protection in the process or to uncheck certain elements, such as extra languages or trailers, on the disk before you do that. </p>
<p><span id="more-1870"></span><img src="http://www.ghacks.net/files/screens/2007/08/hddecrypter.jpg" alt="dvd fab hd decrypter" /></p>
<p>The options should be your first stop before you start using DVDFab HD Decrypter. Make sure you change the temp and output directories if your c: drive does not have enough space to hold a full DVD or HD movie.</p>
<p>The Region Code is removed as well by default making the disk universally playable on all players. It seems however that this setting has to be changed in the options whenever a disk with a different region code is inserted. It was automatically set to region 2 and it did not change when I placed a region 1 disk in the drive. </p>
<p>Still no problem unless you have a lot of disks from different regions. DVDFab HD Decrypter is a great tool if you want to copy DVD or HD movies with or without copy protection. Please note that using this tool might be illegal in some countries.</p>

	Tags: <a href="http://www.ghacks.net/tag/aacs/" title="aacs" rel="tag">aacs</a>, <a href="http://www.ghacks.net/tag/blue-ray/" title="blue ray" rel="tag">blue ray</a>, <a href="http://www.ghacks.net/tag/copy-protection/" title="copy-protection" rel="tag">copy-protection</a>, <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/dvdfab-hd-decrypter/" title="dvdfab hd decrypter" rel="tag">dvdfab hd decrypter</a>, <a href="http://www.ghacks.net/tag/hd-dvd/" title="hd dvd" rel="tag">hd dvd</a>, <a href="http://www.ghacks.net/tag/rip-dvd/" title="rip dvd" rel="tag">rip dvd</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2007/05/06/aacs-response-to-the-publicity-that-they-generated/" title="AACS&#8217;s response to the publicity that they generated (May 6, 2007)">AACS&#8217;s response to the publicity that they generated</a> (3)</li>
	<li><a href="http://www.ghacks.net/2007/08/21/the-hd-dvd-vs-blue-ray-war-confuses-consumers/" title="The HD-DVD vs. Blue-Ray war confuses consumers (August 21, 2007)">The HD-DVD vs. Blue-Ray war confuses consumers</a> (6)</li>
	<li><a href="http://www.ghacks.net/2007/06/12/so-who-is-winning-the-hd-war/" title="So, who is winning the HD war ? (June 12, 2007)">So, who is winning the HD war ?</a> (8)</li>
	<li><a href="http://www.ghacks.net/2006/09/16/one-chip-to-track-them-down/" title="One Chip to track them down (September 16, 2006)">One Chip to track them down</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/01/05/hd-dvd-vs-blue-ray-next-round/" title="HD-DVD vs. Blu-Ray Next Round (January 5, 2008)">HD-DVD vs. Blu-Ray Next Round</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2007/08/14/dvdfab-hd-decrypter/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CSS Nudity</title>
		<link>http://www.ghacks.net/2005/11/30/css-nudity/</link>
		<comments>http://www.ghacks.net/2005/11/30/css-nudity/#comments</comments>
		<pubDate>Wed, 30 Nov 2005 15:24:23 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[nudity]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=191</guid>
		<description><![CDATA[Well this concept has been new to me and it probably is for you as well. Everyone who feels offended by "normal" nudity should not click the following link. Everyone else should enjoy this fine piece of CSS art.]]></description>
			<content:encoded><![CDATA[<p>Well this concept has been new to me and it probably is for you as well. Everyone who feels offended by &#8220;normal&#8221; nudity should not click the following link. Everyone else should enjoy this fine piece of CSS art.</p>
<p>You see a puppet with clothes, by moving the bar to scroll the page you unclothe the puppet. Head over to <a href="http://www.biocandy.dk/test.php" target="_Blank">biocandy.dk</a> for this.</p>
<p><span id="more-191"></span></p>

	Tags: <a href="http://www.ghacks.net/tag/cool/" title="Cool" rel="tag">Cool</a>, <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/entertainment/" title="Entertainment" rel="tag">Entertainment</a>, <a href="http://www.ghacks.net/tag/fun/" title="fun" rel="tag">fun</a>, <a href="http://www.ghacks.net/tag/nudity/" title="nudity" rel="tag">nudity</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2006/04/16/another-world-2006/" title="Another World 2006 (April 16, 2006)">Another World 2006</a> (2)</li>
	<li><a href="http://www.ghacks.net/2006/11/29/zombie-city-tactics/" title="Zombie City Tactics (November 29, 2006)">Zombie City Tactics</a> (0)</li>
	<li><a href="http://www.ghacks.net/2006/11/16/ultrastar-singstar-like-game-for-your-pc/" title="Ultrastar &#8211; Singstar like game for your PC (November 16, 2006)">Ultrastar &#8211; Singstar like game for your PC</a> (10)</li>
	<li><a href="http://www.ghacks.net/2007/01/18/the-silent-japanese-game-show/" title="The Silent Japanese Game Show (January 18, 2007)">The Silent Japanese Game Show</a> (1)</li>
	<li><a href="http://www.ghacks.net/2007/01/09/sudoku-portable/" title="Sudoku Portable (January 9, 2007)">Sudoku Portable</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2005/11/30/css-nudity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
