<?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>Andrei Nastasa</title>
	<atom:link href="http://andreinastasa.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://andreinastasa.com</link>
	<description>Personal Portfolio</description>
	<lastBuildDate>Tue, 09 Mar 2010 18:24:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create a nice HTML form design using CSS3</title>
		<link>http://andreinastasa.com/2010/03/create-a-nice-html-form-design-using-css3/</link>
		<comments>http://andreinastasa.com/2010/03/create-a-nice-html-form-design-using-css3/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 17:33:03 +0000</pubDate>
		<dc:creator>Andrei Nastasa</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://andreinastasa.com/?p=77</guid>
		<description><![CDATA[
			
				
			
		
Creating a nice designed HTML form without using images it&#8217;s not such difficult. Using CSS3 we can create shadows, rounded corners or even gradients. As we all know that you can&#8217;t see any shadow, rounded corners, gradients or other CSS3 stuff in Internet Explorer, this form design is good for CMS or internal pages where <a href="http://andreinastasa.com/2010/03/create-a-nice-html-form-design-using-css3/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fandreinastasa.com%2F2010%2F03%2Fcreate-a-nice-html-form-design-using-css3%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fandreinastasa.com%2F2010%2F03%2Fcreate-a-nice-html-form-design-using-css3%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Creating a nice designed <a href="http://andreinastasa.com/demo/css3-form-design/demo.html" target="_blank"><strong>HTML form</strong></a> without using images it&#8217;s not such difficult. Using CSS3 we can create shadows, rounded corners or even gradients. As we all know that you can&#8217;t see any shadow, rounded corners, gradients or other CSS3 stuff in Internet Explorer, this form design is good for CMS or internal pages where the public don&#8217;t have access. However, it&#8217;s not such bad looking either if you&#8217;re using IE, But please, don&#8217;t use IE6.</p>
<p>All others major browsers let us to view the amazing CSS3 features, so if you are using Opera, Firefox, Chrome or Safari you can enjoy this design.</p>
<p>Ok let&#8217;s take a look in the css code:<br />
For the main box, the css3 elements are the shadow and the rounded corners. Using <strong>box-shadow: 0px 0px 10px #888</strong>, will create a shadow with 0px left offset, 0px top offset and 10px blur effect. The color of the shadow is #888. By changing the first 2 elements, you can move the shadow in every direction. I also used <strong>-moz-box-shadow</strong> and <strong>-webkit-box-shadow</strong> which will allow us to see this design in Mozilla Firefox and Safari or Chrome. How about those rounded corners? Using <strong>border-radius:10px</strong>, we don&#8217;t need anymore to slice up some images with these rounded corners and also we&#8217;ll have full control on changing the radius or the color or the border.</p>
<pre class="brush: css">#form-container {
	background:#F9F9F9;

	border: solid 1px #ddd;

	border-radius:10px;

	-moz-border-radius: 10px; 

	-webkit-border-radius: 10px;

	box-shadow: 0px 0px 10px #888;

	-moz-box-shadow: 0px 0px 10px #888;

	-webkit-box-shadow: 0px 0px 10px #888;

	margin:0px auto;

	padding:15px;

	width:500px;
}
</pre>
<p>I used the <strong>rounded corners</strong> feature also creating the text inputs and the button, or the <em>error </em>and <em>success </em>message boxes. You can easy change whatever you want in this design, all the elements are created using css. A good things about this kind of design is that we don&#8217;t have any <strong>http requests</strong> for background images. This is an important thing and I&#8217;ll write more about this subject in a following post.</p>
<h4>CSS code</h4>
<pre class="brush: css">body { font-family:Arial, Helvetica, sans-serif; font-size:13px; }

#form-container {
	background:#F9F9F9;

	border: solid 1px #ddd;

	border-radius:10px;

	-moz-border-radius: 10px; 

	-webkit-border-radius: 10px;

	box-shadow: 0px 0px 10px #888;

	-moz-box-shadow: 0px 0px 10px #888;

	-webkit-box-shadow: 0px 0px 10px #888;

	margin:0px auto;

	padding:15px;

	width:500px;
}

#form-container h2 { font-size:18px; color:#333; padding:0px; margin:0px 0px 10px 0px; }

fieldset, form { padding:0px; margin:0px; border:none }

#form-container .field  { clear:both; margin:0px; padding:10px 0px; }

label { width:120px; }

input[type=text], textarea {

	background:#fff;

	border:solid 1px #E5E5E5; 

	border-radius:5px;

	-moz-border-radius: 5px; 

	-webkit-border-radius: 5px;

	width:250px;
}
textarea { height:120px }

label, input[type=text], textarea { padding:9px 5px; float:left }

input[type=text]:focus, textarea:focus { background:#EDF3FC; padding:8px 5px; border:solid 2px #D5E3F9; }

.submit-button {
	background: #57A02C;

	border:solid 1px #86CC50;

	border-radius:5px;

		-moz-border-radius: 5px; 

		-webkit-border-radius: 5px;

	color:#FFF;

	cursor:pointer;

	font-size:13px;

	margin-left:130px;

	padding:3px 8px;
}
.submit-button:hover { background:#82D051 }

.error {background: #ffcece; border:solid 1px #df8f8f; }

.success {background: #d5ffce; border:solid 1px #9adf8f; }

.error, .success {

	border-radius:5px;

		-moz-border-radius: 5px; 

		-webkit-border-radius: 5px;

	color:#333;

	padding:9px;

	margin-bottom:10px;
}
</pre>
<h4>HTML code</h4>
<pre class="brush: xml">
<div id="form-container">
<h2>Submit your comment</h2>
<fieldset>
<form>
<div class="error">Error message.</div>
<div class="success">Success message.</div>
<div class="field">
          <label for="Name">Your Name:</label>
<input id="Name" type="text" /></div>
<div class="field">
          <label for="Email">Your Email:</label>
<input id="Email" type="text" /></div>
<div class="field">
          <label for="Website">Your Website:</label>
<input id="Website" type="text" /></div>
<div class="field">
          <label for="Comment">Comment:</label>
          <textarea id="Comment"></textarea></div>
<div class="field">
<input class="submit-button" type="submit" value="Send" /></div>
</form>
</fieldset>
</div>
</pre>
<h4>Live demo</h4>
<p><a href="http://andreinastasa.com/demo/css3-form-design/demo.html">Click here</a> for live demo.</p>
]]></content:encoded>
			<wfw:commentRss>http://andreinastasa.com/2010/03/create-a-nice-html-form-design-using-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customize buttons in a menu using CSS</title>
		<link>http://andreinastasa.com/2010/03/customize-buttons-in-a-menu-using-css/</link>
		<comments>http://andreinastasa.com/2010/03/customize-buttons-in-a-menu-using-css/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 22:11:21 +0000</pubDate>
		<dc:creator>Andrei Nastasa</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://andreinastasa.com/?p=30</guid>
		<description><![CDATA[
			
				
			
		
Let&#8217;s assume we want to create a navigation bar similar with the one below. I think a lot of web developers know how to create it. We slice the &#8220;1px width&#8221; image with the black gradient, one similar image with the green gradient and so on for other colors. If you see here the demo, <a href="http://andreinastasa.com/2010/03/customize-buttons-in-a-menu-using-css/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fandreinastasa.com%2F2010%2F03%2Fcustomize-buttons-in-a-menu-using-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fandreinastasa.com%2F2010%2F03%2Fcustomize-buttons-in-a-menu-using-css%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Let&#8217;s assume we want to create a navigation bar similar with the one below. I think a lot of web developers know how to create it. We slice the &#8220;1px width&#8221; image with the black gradient, one similar image with the green gradient and so on for other colors. If you see <a href="http://andreinastasa.com/demo/easy-change-color-menu/menu_colored.html" target="_blank">here</a> the demo, you&#8217;ll see that every button has his own color. So, the conclusion might be that we&#8217;ll need for each button a different &#8220;1px width&#8221; image with every gradient we want to use.</p>
<p>If you want to change the colors, also you&#8217;ll need another images. The goal here is to create a menu which doesn&#8217;t need to have different images for each color. We&#8217;ll set the colors by changing the hex code in our CSS file. For the gradient we&#8217;ll use only one image which you can download it <a href="http://andreinastasa.com/demo/easy-change-color-menu/menu.zip">here</a>. It&#8217;s a transparent png image, with gradient. The gradient and the transparency over a color, will create the gradient effect for every color used.</p>
<p>I have to mention that this menu will work properly only on browsers like ie7+, firefox, chrome, safari and opera. Internet explorer 6 doesn&#8217;t support transparent png files, and I hadn&#8217;t tested it in other browsers.</p>
<p><a href="http://andreinastasa.com/wp-content/uploads/2010/03/menu2.png"><img class="alignnone size-full wp-image-29" title="menu2" src="http://andreinastasa.com/wp-content/uploads/2010/03/menu2.png" alt="menu model 2" width="672" height="35" /></a></p>
<h4>CSS code</h4>
<p><strong>#menu, #menu li {  background-color:#000; }</strong> &#8211; This line will change the background of the main menu. The latest classes ( .blue:hover and the others ) will change the background color for the buttons. You have to declare some classes with the colors you want, and then apply them to each button, making this menu easy to customize. Class .hover has the transparent png file as a background.</p>
<pre class="brush: css">body { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; }

#wrapper { width:960px; margin:10px auto; }

.hover { background:url(hover.png) repeat-x; }

#menu { height:50px; line-height:50px; }

#menu ul { padding:0px; margin:0px; list-style:none }

#menu ul li { margin:0px 25px; padding:0px; font-size:16px; float:left }

#menu, #menu li {  background-color:#000; }

#menu ul li a {
	display:block;  

	font-weight:bold; 

	color:#FFF;

	padding:0px 25px;

	text-decoration:none
}
#menu ul li a:hover { text-decoration:underline }

.blue:hover { background-color:#11AFD8 }
.orange:hover { background-color:#D25503 }
.green:hover { background-color:#399913 }
.yellow:hover { background-color:#D9AE08 }
</pre>
<h4>HTML code</h4>
<p>You will have to apply the &#8220;.hover&#8221; class to all buttons, and also the class containing the colors you want for each button.</p>
<pre class="brush: html">
<div id="wrapper">
<div id="menu" class="hover">
<ul>
<li><a class="blue hover" href="#">Menu item 1</a></li>
<li><a class="green hover" href="#">Menu item 2</a></li>
<li><a class="orange hover" href="#">Menu item 3</a></li>
<li><a class="yellow hover" href="#">Menu item 4</a></li>
</ul>
</div>
</div>
</pre>
<h4>Live demo</h4>
<p><a href="http://andreinastasa.com/demo/easy-change-color-menu/menu_colored.html">Click here</a> for live demo.</p>
<h4>Get it</h4>
<p><a href="http://andreinastasa.com/demo/easy-change-color-menu/menu.zip">Click here</a> to download the files.</p>
]]></content:encoded>
			<wfw:commentRss>http://andreinastasa.com/2010/03/customize-buttons-in-a-menu-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://andreinastasa.com/2010/03/hello-world-2/</link>
		<comments>http://andreinastasa.com/2010/03/hello-world-2/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 15:00:15 +0000</pubDate>
		<dc:creator>Andrei Nastasa</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andreinastasa.com/?p=13</guid>
		<description><![CDATA[
			
				
			
		
]]></description>
			<content:encoded><![CDATA[
			
				
			
		
]]></content:encoded>
			<wfw:commentRss>http://andreinastasa.com/2010/03/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
