<?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>Luis Arana &#124; Web Designer, Web Developer, Multimedia Guru &#187; CSS</title>
	<atom:link href="http://www.luisarana.com/blog/category/web-development/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luisarana.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 07 Sep 2011 20:43:38 +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>How To Build a Basic CSS Layout</title>
		<link>http://www.luisarana.com/blog/2009/12/how-to-build-a-basic-css-layout/</link>
		<comments>http://www.luisarana.com/blog/2009/12/how-to-build-a-basic-css-layout/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 19:44:55 +0000</pubDate>
		<dc:creator>Luis Arana</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://luisarana.com/blog/?p=516</guid>
		<description><![CDATA[Creating websites without using tables for layouts by using CSS layouts is the new standard for commercial web development.  This article details how to create a basic 2 column CSS layout which you can use for future design projects. 1. Divide your page into sections &#8211; the &#60;div&#62; tags allows you to create seperate divisions [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-517" title="webdesign" src="http://luisarana.com/blog/wp-content/uploads/2009/12/webdesign.jpg" alt="webdesign" width="600" height="602" /></p>
<p>Creating websites without using tables for layouts by using CSS layouts is the new standard for commercial web development.  This article details how to create a basic 2 column CSS layout which you can use for future design projects.</p>
<p>1. Divide your page into sections &#8211; the &lt;div&gt; tags allows you to create seperate divisions on your web page. Each can be identified with a unique id. You can then add a style in CSS (called a selector) that specifically applies to the div of that id.</p>
<p>Remember to include the DOCTYPE (to render your page accurately in  browsers) and include meta tags in the          header of your document to enable search engines to spider your pages.</p>
<p>-wrapper: is the div that wraps around all the other divs like a container for the page elements.<br />
-header: defines the top banner of the page<br />
-main: defines the main content of the page<br />
-nav: defines the navigation of the page<br />
-footer: defines the footer and sub-navigation of the page</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;How to Build a Basic CSS Layout&lt;/title&gt;<br />
&lt;meta name=&#8221;Description&#8221; content=&#8221;How to Build a Basic CSS Layout&#8221; /&gt;<br />
&lt;meta name=&#8221;Keywords&#8221; content=&#8221;css layout&#8221; /&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243;&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;wrapper&#8221;&gt;<br />
&lt;div id=&#8221;header&#8221;&gt;<br />
&lt;h1&gt;How To Build a Basic CSS Layout&lt;/h1&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;nav&#8221;&gt;<br />
&lt;h2&gt;Navigation&lt;/h2&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;main&#8221;&gt;&lt;/div&gt;<br />
&lt;div id=&#8221;footer&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>2. Create the CSS code &#8211; below is the CSS code that styles the page as a centered 2 column CSS layout with a navigation bar and a footer. The div#wrapper style creates the centered box which acts as a container for the rest of the page content. The width: 80% rule sets the width of the div. The background-color:#FFFFFF rule creates a white background for the div. The margin-top: 50px and margin-bottom: 50px rules create a space of 50 pixels for the top and bottom margins for the div itself.</p>
<p>The proper way to center a block-level element with CSS is to set margin-left: auto and margin-right: auto. This instructs the browser to automatically calculate equal margins for both sides, thus centering the div. The border: thin solid #000000 rule adds a border around the outer div. The rest of the CSS code styles the divs for the header, footer, nav, and main content.</p>
<p>The div#header and div#footer styles set margins and padding for those divs. In addition, div#header includes the text-align: center rule to center the header text, and div#footer includes the border-top: thin solid #000000 rule to create a border along the top edge of the div to replace the horizontal rule above the footer in the table-based layout.</p>
<p>The div#nav and div#main styles create the two columns in the middle of the centered box. In the div#nav style, the float: left rule pushes the div to the left side of its parent element (the wrapper div), and the width: 25% rule sets the div&#8217;s width to 25 percent of the parent element. With the nav div floated to the left and limited to a set width, it leaves room for the main div to move up to the right of the nav div, thus creating the two-column effect. The div#main style includes the margin-left: 30% rule to keep the main text aligned in a neat column instead of spreading out below the nav column. The main div&#8217;s left margin is set to a value slightly larger than the width of the nav div.</p>
<p>&lt;style type=&#8221;text/css&#8221;&gt;<br />
&lt;!&#8211;<br />
body {<br />
background-color: #999999;<br />
font-size:12px;<br />
font-family:Verdana, Arial, Helvetica, sans-serif;<br />
}<br />
div#wrapper {<br />
width: 80%;<br />
background-color:#FFFFFF;<br />
margin-top: 50px;<br />
margin-bottom: 50px;<br />
margin-left: auto;<br />
margin-right: auto;<br />
padding: 0px;<br />
border: thin solid #000000;<br />
}<br />
div#header {<br />
padding: 15px;<br />
margin: 0px;<br />
text-align: center;<br />
}<br />
div#nav {<br />
width: 25%;<br />
padding: 10px;<br />
margin-top: 1px;<br />
float: left;<br />
}<br />
div#main {<br />
margin-left: 30%;<br />
margin-top: 1px;<br />
padding: 10px;<br />
}<br />
div#footer {<br />
padding: 15px;<br />
margin: 0px;<br />
border-top: thin solid #000000;<br />
}<br />
&#8211;&gt;<br />
&lt;/style&gt;</p>
<p>3. Create the side navigation menu &#8211; to build the left side navigation I use the normal CSS code for the different links ie</p>
<p>a:link {<br />
text-decoration: none;<br />
}<br />
a:visited {<br />
text-decoration: none;<br />
}<br />
a:hover {<br />
text-decoration: underline;<br />
color: #FF0000;<br />
}<br />
a:active {<br />
text-decoration: none;<br />
}</p>
<p>If links are placed elsewhere on the page they will inherit the same          properties as above..a blue link that hovers to red.</p>
<p>What if you wish to create another set of different colored links          that change color and are underlined when your mouse passes over them?</p>
<p>4. Create the bottom navigation &#8211; to include the navigation in the &lt;div id=&#8221;footer&#8221;&gt; section of the page, I use div#footer and code each link accordingly. To make the list go horizontally I use: display: inline;</p>
<p>div#footer ul li{<br />
color : #000000;<br />
background-color : transparent;<br />
display: inline;<br />
}</p>
<p>div#footer ul li a{<br />
color : #115EAC;<br />
background-color : transparent;<br />
text-decoration : none;<br />
}</p>
<p>div#footer ul li a:hover{<br />
text-decoration : underline;<br />
}<br />
&#8211;&gt;</p>
<p>Now that I have finished creating my style sheet I want to shorten the code on page by linking it to my external style sheet. Here&#8217;s how:</p>
<p>5. Create an external style sheet &#8211; copy and paste all the css code (without these tags: &lt;style type=&#8221;text/css&#8221;&gt;&lt;!&#8211; &#8211;&gt;&lt;/style&gt;) into notepad and name it something like &#8220;style sheet&#8221;. Place this style sheet between the head tags of your web page like this:</p>
<p>&lt;head&gt;<br />
&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;stylesheet.css&#8221; type=&#8221;text/css&#8221; /&gt;<br />
&lt;/head&gt;</p>
<p>This will reduce the code on your page so it will load fast plus the search engines can more easily spider your web page.</p>
<p>6. Add content to your page &#8211; after you have got your page looking correctly, you can add more content to it. Adjustments can easily be made to any style on the page (or your whole site) by simply editing one style sheet.</p>
<p>7. Upload your files &#8211; be sure to upload your web pages and style sheet to the root directory of your server.</p>
<p>8. Validate your code &#8211; be sure to validate your xhtml code: <a href="http://validator.w3.org/">http://validator.w3.org/</a> and css code: <a href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a> and make corrections where necessary.</p>
<p>9. Check browser compatibility and screen resolution &#8211; check that your page renders well in the popular browsers (IE6, NN7, Firefox)</p>
<p>If you are beginning with CSS layouts, implement then slowly by making small changes to your pages i.e. creating a style sheet for your main headers and fonts only. As you become more familiar with CSS you may eventually build all your future sites with CSS layouts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisarana.com/blog/2009/12/how-to-build-a-basic-css-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is CSS?</title>
		<link>http://www.luisarana.com/blog/2009/12/what-is-css/</link>
		<comments>http://www.luisarana.com/blog/2009/12/what-is-css/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:33:26 +0000</pubDate>
		<dc:creator>Luis Arana</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development. Web Design]]></category>

		<guid isPermaLink="false">http://luisarana.com/blog/?p=265</guid>
		<description><![CDATA[CSS was first developed in 1997, as a way for Web developers to define the look and feel of their Web pages. It was intended to allow developers to separate content from design so that HTML could perform more of the function that it was originally based on &#8211; the markup of content, without worry [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-282" title="main" src="http://luisarana.com/blog/wp-content/uploads/2009/12/main.gif" alt="main" width="400" height="350" /></p>
<p>CSS was first developed in 1997, as a way for Web developers to define the look and feel of their Web pages. It was intended to allow developers to separate content from design so that HTML could perform more of the function that it was originally based on &#8211; the markup of content, without worry about the design and layout.</p>
<p>CSS didn&#8217;t gain in popularity until around 2000, when Web browsers began using more than the basic font and color aspects of CSS. And now, all modern browsers support all of CSS Level 1, most of CSS Level 2, and some aspects of CSS Level 3.</p>
<p>Web Designers that don&#8217;t use CSS for their design and development of Web sites are rapidly becoming a thing of the past. And it is arguably as important to understand CSS as it is to know HTML &#8211; and some would say it was more important to know CSS.</p>
<h3>CSS is an Abbreviation</h3>
<p>It stands for Cascading Style Sheet.</p>
<p>Style sheet refers to the document itself. Style sheets have been used for document design for years. They are the technical specifications for a layout, whether print or online. Print designers use style sheets to insure that their designs are printed exactly to specifications. A style sheet for a Web page serves the same purpose, but with the added functionality of also telling the viewing engine (the Web browser) how to render the document being viewed.</p>
<p>Cascade is the special part. A Web style sheet is intended to cascade through a series of style sheets, like a river over a waterfall. The water in the river hits all the rocks in the waterfall, but only the ones at the bottom affect exactly where the water will flow. The same is true of the cascade in Web style sheets.</p>
<p>Every Web page is affected by at least one style sheet, even if the Web designer doesn&#8217;t apply any styles. This style sheet is the user agent style sheet &#8211; the default styles that the Web browser will use to display a page if no other instructions are provided. But if the designer provides other instructions, the browser needs to know which instructions have precedence.</p>
<p>For example, in my Web browser, the default font is &#8220;Times New Roman&#8221; size 16. But nearly no pages I visit display in that font family and size. This is because the cascade defines the second style sheets set by the designers to redefine the font size and family and override my Web browser&#8217;s defaults.</p>
<h3>Where is CSS Used?</h3>
<p>CSS is used to style Web pages. But there is more to it than that. CSS is used to style XHTML and XML markup. This means that anywhere you have XML markup (including XHTML) you can use CSS to define how it will look.</p>
<p>CSS is also used to define how Web pages should look when viewed in other media than a Web browser. For example, you can create a print style sheet that will define how the Web page should print out and another style sheet to display the Web page on a projector for a slide show.</p>
<h3>Why is CSS Important?</h3>
<p>CSS is one of the most powerful tools a Web designer can learn because with it you can affect the entire mood and tone of a Web site. Well written style sheets can be updated quickly and allow sites to change what is prioritized or valued without any changes to the underlying XHTML.</p>
<p>The challenge of CSS is that there is so much to learn. But it doesn&#8217;t seem like it. After all, there are only around 60 properties in CSS Level 1 and around 70 in CSS Level 2. Compared with the number of HTML tags and attributes to learn, that can feel like a cake walk.</p>
<p>But because CSS can cascade, and combine and browsers interpret the directives differently, CSS is more difficult than plain HTML. But once you start using it, you&#8217;ll see that harnessing the power of CSS will give you more options and allow you to do more and more things with your Web sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisarana.com/blog/2009/12/what-is-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

