<?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>WebDesign &#38; Such &#187; CSS</title>
	<atom:link href="http://webdesignandsuch.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesignandsuch.com</link>
	<description>a Beantown Design Production</description>
	<lastBuildDate>Thu, 29 Jul 2010 00:02:25 +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>Target the first paragraph on a page or section with CSS</title>
		<link>http://webdesignandsuch.com/2010/02/target-the-first-paragraph-on-a-page-or-section-with-css/</link>
		<comments>http://webdesignandsuch.com/2010/02/target-the-first-paragraph-on-a-page-or-section-with-css/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 13:40:41 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=732</guid>
		<description><![CDATA[
			
				
			
		

So often I&#8217;ll be working on a website that somebody else coded and have to strip out junk styling. There are a lot of different ways to accomplish the same thing with CSS, but so many people have no idea how much time they are wasting by coding something in a &#8220;hacky&#8221; manner.
Example. I was [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2010%2F02%2Ftarget-the-first-paragraph-on-a-page-or-section-with-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2010%2F02%2Ftarget-the-first-paragraph-on-a-page-or-section-with-css%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img class="alignnone" style="border: 3px solid #1e8acf; margin: 0 0 15px 0;" title="CSS child selector" src="http://webdesignandsuch.com/posts/css-child/para.jpg" alt="" width="422" height="211" /></p>
<p>So often I&#8217;ll be working on a website that somebody else coded and have to strip out junk styling. There are a lot of different ways to accomplish the same thing with CSS, but so many people have no idea how much time they are wasting by coding something in a &#8220;hacky&#8221; manner.</p>
<p><strong>Example.</strong><br /> I was working on a site the other day and noticed that every single paragraph in the main content area of every page of the site had a class of &#8220;first-paragraph&#8221; on it. So I looked in the external sheet and saw that this was simply to remove the top margin on the first paragraph on every page. Ok, so that method worked..great. Except that manually adding a class to every paragraph tag is such a waste of time. Check out the demo where I show an example of targeting the first paragraph in a content area without adding any classes or IDs paragraph tag in the XHTML. Then keep reading to see how to properly code the example above.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/css-child/index.html">View Demo</a><br />
<span id="more-732"></span><br />
Here is the code to put in your external CSS sheet to select the first paragraph in a section (in this example a div called &#8220;content&#8221;). In this example I remove the top margin. If the coder in my example above had done this he wouldn&#8217;t have need to add any class to the paragraph tags in the XHTML. Don&#8217;t ya just love CSS?</p>
<div class="codeBox">#content p:first-child {margin-top:0px}</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2010/02/target-the-first-paragraph-on-a-page-or-section-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a Popup with CSS and Javascript</title>
		<link>http://webdesignandsuch.com/2009/12/how-to-create-a-popup-with-css-and-javascript/</link>
		<comments>http://webdesignandsuch.com/2009/12/how-to-create-a-popup-with-css-and-javascript/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 17:27:23 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Pop Up]]></category>
		<category><![CDATA[Popup]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=709</guid>
		<description><![CDATA[
			
				
			
		

Popups suck.
The good thing is you don&#8217;t see that many of them any more. That&#8217;s because browsers recognize that they suck and are most likely spam or ads and so they block the popups. The old way of creating a popup was to force open a new browser window over the current browser window. So [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fhow-to-create-a-popup-with-css-and-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fhow-to-create-a-popup-with-css-and-javascript%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img class="alignnone" style="border: 3px solid #000; margin: 0 0 15px 0;" title="css popup" src="http://webdesignandsuch.com/posts/css-popup/pop.gif" alt="" width="422" height="211" /></p>
<h2 style="margin-bottom:20px">Popups suck.</h2>
<p>The good thing is you don&#8217;t see that many of them any more. That&#8217;s because browsers recognize that they suck and are most likely spam or ads and so they block the popups. The old way of creating a popup was to force open a new browser window over the current browser window. So this is what browsers block. But what if you actually have a need to use a popup window for something useful and not spammy? This happened to me the other day. A client wanted a popup window on their homepage to wish everyone a Merry Christmas.</p>
<p>Knowing I couldn&#8217;t use the old popup method, I went searching. I knew it&#8217;d be easy enough to use CSS to put a floating div over the content of the site, which creates a popup effect. The problem was how do you close the popup once it&#8217;s open? Javascript would be needed for this. Check out the demo I setup which shows how the <strong>CSS popup</strong> can be set to open on <strong>pageload</strong> or by <strong>clicking on a link</strong>; and then how Javascript allows you to have a &#8220;close&#8221; button that shuts or hides the popup. Then continue reading for the code and downloadable files.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/css-popup/css-popup.html">View Demo</a></p>
<p><span id="more-709"></span></p>
<p>If you check out the source code of the html file, you&#8217;ll see the following in the body. The &#8220;<strong>blanket</strong>&#8221; is the effect of putting the transparent black background behind the popup, which helps separate it from the rest of the content on the page. The &#8220;<strong>popUpDiv</strong>&#8221; is where you put the content of your popup.</p>
<div class="codeBox">&lt;div id=&#8221;blanket&#8221; style=&#8221;display:none;&#8221;&gt;&lt;/div&gt;<br />
&lt;div id=&#8221;popUpDiv&#8221; style=&#8221;display:none;&#8221;&gt;</p>
<p>&lt;a href=&#8221;#&#8221; onclick=&#8221;popup(&#8216;popUpDiv&#8217;)&#8221; &gt;Click to Close CSS Pop Up&lt;/a&gt;<br />
&lt;/div&gt;<br />
&lt;a href=&#8221;#&#8221; onclick=&#8221;popup(&#8216;popUpDiv&#8217;)&#8221;&gt;Click to Open CSS Pop Up&lt;/a&gt;</p>
</div>
<p>If you want the popup to load on <strong>page load</strong>, put the following in your body tag.</p>
<div class="codeBox">&lt;body   onload=&#8221;popup(&#8216;popUpDiv&#8217;)&#8221;&gt;</div>
<p>Here is the CSS used to style the blanket effect and the popup div. You&#8217;ll see I turned the blanket effect off for Internet Explorer, since it doesn&#8217;t appear to support &#8220;opacity&#8221; (big surprise).</p>
<div class="codeBox">#blanket {<br />
background-color:#111;<br />
opacity: 0.65;<br />
*background:none;<br />
position:absolute;<br />
z-index: 9001;<br />
top:0px;<br />
left:0px;<br />
width:100%;<br />
}</p>
<p>#popUpDiv {<br />
position:absolute;<br />
background:url(pop-back.jpg) no-repeat;<br />
width:400px;<br />
height:400px;<br />
border:5px solid #000;<br />
z-index: 9002;<br />
}</p>
</div>
<p>There is a Javacript file linked to the html file to make some of the magic happen. I&#8217;m going to make the demo files available so you can play with it and make your own. <strong>Enjoy!</strong></p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/css-popup/css-popup.zip">Download Files</a></p>
<p>One last thing.. the original code for this was <a href="http://www.pat-burt.com/web-development/how-to-do-a-css-popup-without-opening-a-new-window/">found here</a>. I made some edits to make it work for my application.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/12/how-to-create-a-popup-with-css-and-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simple form styling with CSS</title>
		<link>http://webdesignandsuch.com/2009/12/simple-form-styling-with-css/</link>
		<comments>http://webdesignandsuch.com/2009/12/simple-form-styling-with-css/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 14:07:15 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=649</guid>
		<description><![CDATA[
			
				
			
		

I create a couple of forms a week for client&#8217;s websites. Usually they&#8217;re very similar in content. First Name, Last Name, Address, Phone Number, Email, Comments, etc. Of course I like to use a little CSS to style these forms up to match the rest of the site. I find myself copying the same basic [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fsimple-form-styling-with-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fsimple-form-styling-with-css%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img alt="" src="http://webdesignandsuch.com/posts/form-styling/form-pic.jpg" title="form styling css" class="alignnone" width="422" height="211" style="border:3px solid #ddd; margin:0 0 15px 0" /></p>
<p>I create a couple of forms a week for client&#8217;s websites. Usually they&#8217;re very similar in content. <strong>First Name</strong>, <strong>Last Name</strong>, <strong>Address</strong>, <strong>Phone Number</strong>, <strong>Email</strong>, <strong>Comments</strong>, etc. Of course I like to use a little CSS to style these forms up to match the rest of the site. I find myself copying the same basic styles over from the last form I created, and then editing the background colors and borders of the inputs, buttons, etc. I decided it was time to put these base styles online so they would be easy to grab on any project. And of course hopefully this will help other designers realize how simple the process is, and why there should never be an un-styled form on a website.</p>
<p>Check out the demos to see how by changing a couple of CSS rules you can create a completely different looking form to match your website. Then continue reading to see how the CSS code works for this. When viewing the demo forms, try typing in the fields to see how the background color of the fields can be changed, as can the color of the text in the field. Also, try to roll your mouse over the buttons to see how they can have rollover effects put on them.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/form-styling/css-form-styling.html" target="_blank">View Demo 1</a></p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/form-styling/css-form-styling2.html" target="_blank">View Demo 2</a></p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/form-styling/css-form-styling3.html" target="_blank">View Demo 3</a><br />
<span id="more-649"></span></p>
<h2 style="border-top:1px dotted #ccc; padding-top:15px; margin-bottom:15px; margin-top:20px">Form 1</h2>
<div class="codeBox"><img alt="" src="http://webdesignandsuch.com/posts/form-styling/form1.jpg" title="form" class="alignnone" width="239" height="186"  style="float:right"/><br />
input, textarea {<br />
	background-color:#eee;<br />
	border:1px solid #d8f000;<br />
	padding:3px;<br />
	width:195px;<br />
	color:#036;<br />
	font-weight:bold}</p>
<p>input {<br />
	-webkit-border-radius:10px;<br />
	-moz-border-radius:10px;<br />
}</p>
<p>.submit {<br />
	width:100px;<br />
	background-color:#d8f000;<br />
	border:1px solid #fff;<br />
	cursor:pointer;<br />
	*border:1px;<br />
	font-weight:bold;<br />
	-webkit-border-radius:10px;<br />
	-moz-border-radius:10px;<br />
	color:#036;<br />
	font-weight:bold<br />
}</p>
<p>.submit:hover {background-color:#ffc;}</p></div>
<p>You&#8217;ll see in the above form how I used <a href="http://webdesignandsuch.com/2009/10/rounded-corners-with-css3-border-radius/">Border-Radius</a> on the <strong>buttons</strong> and the <strong>inputs</strong>. This gives a nice effect, but doesn&#8217;t break the design if the user of the website is on a non-compliant browser. You&#8217;ll see when I styled the buttons I made a class called &#8220;<strong>submit</strong>&#8220;. So in the XHTML code, both the <strong>Submit</strong> button and the <strong>Reset</strong> button have the class &#8220;submit&#8221;. You can see how rollovers can be made for the buttons. I also set the cursor type to &#8220;<strong>Pointer</strong>&#8221; for the buttons, since for some reason it&#8217;s the arrow cursor by default.</p>
<h2 style="border-top:1px dotted #ccc; padding-top:15px; margin-bottom:15px; margin-top:20px">Form 2</h2>
<div class="codeBox"><img alt="" src="http://webdesignandsuch.com/posts/form-styling/form2.jpg" title="form" class="alignnone" width="239" height="186"  style="float:right"/><br />
input, textarea {<br />
	background-color:#fff;<br />
	border:1px dotted #999;<br />
	width:200px;<br />
	padding:2px;<br />
	font-weight:bold<br />
}</p>
<p>input:focus, textarea:focus {background:#eee}</p>
<p>.submit {<br />
	width:100px;<br />
	background-color:#263895;<br />
	color:#fff;<br />
	border:1px solid #999;<br />
	cursor:pointer;<br />
	*border:1px;<br />
	font-weight:bold;<br />
	padding:2px<br />
}</p>
<p>.submit:hover {background-color:#4054bd;}</p></div>
<p>With this form I wanted to show how you don&#8217;t need to use crazy loud colors to style a form to look better. The style is pretty plain on this form, but the <strong>dotted borders</strong> give the inputs a touch of character. You can also see the use of &#8220;<strong>:focus</strong>&#8221; on the <strong>inputs</strong> and <strong>textarea</strong>. What this does is change the background color of the input when your cursor is inside of it. This helps your users keep track of where they are on the form.</p>
<h2 style="border-top:1px dotted #ccc; padding-top:15px; margin-bottom:15px; margin-top:20px">Form 3</h2>
<div class="codeBox"><img alt="" src="http://webdesignandsuch.com/posts/form-styling/form3.jpg" title="form" class="alignnone" width="239" height="186"  style="float:right"/><br />
input, textarea {<br />
background:url(back.jpg) repeat-x #93e1ff;<br />
border:1px solid #848383;<br />
width:191px; padding:5px;<br />
color:#006;<br />
font-weight:bold;<br />
-webkit-border-radius:5px;<br />
-moz-border-radius:5px<br />
}</p>
<p>input:focus, textarea:focus {background:url(backRoll.jpg) repeat-x #86cee9;}</p>
<p>.submit {<br />
width:100px;<br />
background-color:#93e1ff;<br />
border:1px solid #848383;<br />
cursor:pointer;<br />
*border:1px;<br />
color:#006;<br />
font-weight:bold;<br />
-webkit-border-radius:5px;<br />
-moz-border-radius:5px<br />
}</p>
<p>.submit:hover {background:url(backRoll.jpg) repeat-x #86cee9;<br />
color:#006; font-weight:bold}</p></div>
<p>With this final form you can see how <strong>background images</strong> can be used inside the inputs and buttons. I made a slightly darker version of the background image for the &#8220;<strong>:focus</strong>&#8221; state.</p>
<p>With these basic CSS techniques, you can see how simple it is to make a contact form much more visually appealing and match the rest of your website.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/12/simple-form-styling-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A look at the CSS Cursor Property</title>
		<link>http://webdesignandsuch.com/2009/12/a-look-at-the-css-cursor-property/</link>
		<comments>http://webdesignandsuch.com/2009/12/a-look-at-the-css-cursor-property/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 01:31:41 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=623</guid>
		<description><![CDATA[
			
				
			
		


Recently I was setting up CSS styles for a navigation. One thing I do a lot is change the cursor type with CSS for the link of the current page. So if you are on the About page and you roll over the About link, your cursor will be the default arrow, not the hand [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fa-look-at-the-css-cursor-property%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fa-look-at-the-css-cursor-property%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img alt="" src="http://webdesignandsuch.com/posts/cursor-types/cursor.jpg" title="cursor" class="alignnone" width="460" height="175" style=" margin:0 0 25px 0"/></p>
<p style="margin-top:25px">
Recently I was setting up CSS styles for a navigation. One thing I do a lot is change the cursor type with CSS for the link of the current page. So if you are on the <strong>About page</strong> and you roll over the <strong>About link</strong>, your cursor will be the default arrow, not the hand pointing the finger which indicates a link. Sure it&#8217;s still a link, but I feel this helps distinguish the page you are currently on a little bit further than just changing the color of the current page link.</p>
<p>As I was doing this styling I realized that there are actually quite a number of different cursor types that can be set with the CSS cursor property. Keep reading to see the examples and code for each.<br />
<span id="more-623"></span>
<p>
Below are the different cursor types. The CSS property is written like this: <strong>cursor:crosshair</strong> Just change &#8220;crosshair&#8221; with whatever you want the users cursor to do on hover.</p>
<p><strong>Roll your cursor over the examples below to see the different cursor types available.</strong></p>
<h2 style="cursor:auto; color:#999999; padding:18px; border-bottom:1px dotted #ccc; margin:0">cursor: auto</h2>
<h2 style="cursor:crosshair; color:#999999; padding:18px; border-bottom:1px dotted #ccc; margin:0">cursor:  crosshair</h2>
<h2 style="cursor:default; color:#999; padding:18px; border-bottom:1px dotted #ccc; margin:0">cursor:default</h2>
<h2 style="cursor:help; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: help</h2>
<h2 style="cursor:pointer; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: pointer</h2>
<h2 style="cursor:wait; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: wait</h2>
<h2 style="cursor: progress; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: progress</h2>
<h2 style="cursor: text; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: text</h2>
<h2 style="cursor: vertical-text; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: vertical-text</h2>
<h2 style="cursor: alias; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: alias</h2>
<h2 style="cursor: copy; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: copy</h2>
<h2 style="cursor: move; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: move</h2>
<h2 style="cursor: no-drop; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: no-drop</h2>
<h2 style="cursor: not-allowed; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: not-allowed</h2>
<h2 style="cursor: context-menu; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: context-menu</h2>
<h2 style="cursor: cell; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: cell</h2>
<h2 style="cursor: col-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: col-resize</h2>
<h2 style="cursor: row-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: row-resize</h2>
<h2 style="cursor: all-scroll; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: all-scroll</h2>
<h2 style="cursor: e-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: e-resize</h2>
<h2 style="cursor: n-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: n-resize</h2>
<h2 style="cursor: ne-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: ne-resize</h2>
<h2 style="cursor: nw-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: nw-resize</h2>
<h2 style="cursor: s-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: s-resize</h2>
<h2 style="cursor: se-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: se-resize</h2>
<h2 style="cursor: sw-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: sw-resize</h2>
<h2 style="cursor: w-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: w-resize</h2>
<h2 style="cursor: ew-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: ew-resize</h2>
<h2 style="cursor: ns-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: ns-resize</h2>
<h2 style="cursor: nesw-resize;  padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: nesw-resize</h2>
<h2 style="cursor: nwse-resize; padding:18px; border-bottom:1px dotted #ccc; margin:0; color:#999;">cursor: nwse-resize</h2>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/12/a-look-at-the-css-cursor-property/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embed a Twitter Feed on your website with jQuery</title>
		<link>http://webdesignandsuch.com/2009/12/embed-a-twitter-feed-on-your-website-with-jquery/</link>
		<comments>http://webdesignandsuch.com/2009/12/embed-a-twitter-feed-on-your-website-with-jquery/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 01:17:34 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Twit]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=612</guid>
		<description><![CDATA[
			
				
			
		

In a previous post I showed possibly the easiest way to embed a Twitter feed on your website. This brought up a couple of questions from some users.
1. Can you make a background behind individual Tweets?
2. Can you put the date on it&#8217;s own separate line?
As the case goes with a lot of things these [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fembed-a-twitter-feed-on-your-website-with-jquery%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fembed-a-twitter-feed-on-your-website-with-jquery%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img alt="" src="http://webdesignandsuch.com/posts/jQuery-twitter/twitter.jpg" title="embed twitter" class="alignnone" width="422" height="211" style="border:3px solid #ddd; margin:0 0 15px 0"/></p>
<p>In a <a href="http://webdesignandsuch.com/2009/11/how-to-embed-a-twitter-feed-on-your-website/">previous post</a> I showed possibly the easiest way to embed a Twitter feed on your website. This brought up a couple of questions from some users.</p>
<p><strong>1. Can you make a background behind individual Tweets?<br />
2. Can you put the date on it&#8217;s own separate line?</strong></p>
<p>As the case goes with a lot of things these days <em><strong>jQuery to the rescue</strong></em>! Check out the demo to see both of these things in action, and then continue reading to see how to accomplish these things with jQuery and download the source files.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/jQuery-twitter/">View Demo</a><span id="more-612"></span></p>
<p>The jQuery and CSS code to make this happen came from Chris over at CSS-Tricks. I slimmed down and edited it to make it work for me. Here is a zip of the files used for the demo so you can download and edit it as you want.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/jQuery-twitter/jQuery-twitter.zip">Download Files</a></p>
<p>You&#8217;ll see in the head of the index page the jQuery which makes it work. The line you need to change is the following:</p>
<div class="codeBox">
<strong>http://twitter.com/status/user_timeline/<span style="color:#09a1dc">ilz_</span>.json?<span style="color:#09a1dc">count=5</span>&#038;callback=?</strong></div>
<p>First replace the part I highlighted in Blue &#8220;ilz_&#8221; with your Twitter user name.<br/><br />
Next, replace &#8220;count=5&#8243; with the number of tweets you want to show up on your page.</p>
<p>Other than that, you should be able to style the rest of the text, links, etc. as long as you know basic CSS. <strong>Enjoy!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/12/embed-a-twitter-feed-on-your-website-with-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery Product Slider</title>
		<link>http://webdesignandsuch.com/2009/12/jquery-product-slider/</link>
		<comments>http://webdesignandsuch.com/2009/12/jquery-product-slider/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 17:49:46 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=602</guid>
		<description><![CDATA[
			
				
			
		

Recently I was put in charge of creating a product slider for a client&#8217;s website. There would be four products shown at a time, with one new product being revealed each time as the slider moved from the right to the left. I figured there was a jQuery slider out there that I could manipulate [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fjquery-product-slider%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F12%2Fjquery-product-slider%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><a href="http://webdesignandsuch.com/posts/jquery-slider/"><img alt="" src="http://webdesignandsuch.com/posts/jquery-slider/pic.jpg" title="jQuery slider" class="alignnone" width="422" height="211" style=" margin:0 0 15px 0" /></a></p>
<p>Recently I was put in charge of creating a product slider for a client&#8217;s website. There would be four products shown at a time, with one new product being revealed each time as the slider moved from the right to the left. I figured there was a jQuery slider out there that I could manipulate for this, and after a little hunting I found one. </p>
<p>The actual slider and website I created it for isn&#8217;t live yet. I used the base slider I created and used a few Apple images to show the general idea in the demo. So check out the demo, and then keep reading to see the details.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/jquery-slider/">View Demo</a><br />
<span id="more-602"></span><br />
So the original code for this slider is <a href="http://sorgalla.com/jcarousel/" target="_blank">jCarousel</a>. I figured I would put up this demo to show how with a few modifications to the code you can create a useful product slider. You&#8217;ll notice how it&#8217;s created with an unordered list. I also showed how you can use rollover effects, and link each image to a webpage; which is obviously the point of the slider in the first place.</p>
<p>The slider has an autoplay feature. I added some code to the original jCarousel to make the slider go only one product at a time. This is in the head of the index.html file. The line &#8220;<strong>scroll: 1</strong>&#8220;. If you want it to scroll 2 items, change it to 2, and so on.</p>
<p>Now I admit the code here isn&#8217;t the prettiest, but as I mentioned this was created strictly for the demo, to show some of the possibilities. I&#8217;m going to provide all these files in a .zip file for download, in case you want to play around with the slider. Enjoy!</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/jquery-slider/jquery-slider.zip">Download the Files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/12/jquery-product-slider/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Box-Shadow with CSS3</title>
		<link>http://webdesignandsuch.com/2009/11/using-box-shadow-with-css3/</link>
		<comments>http://webdesignandsuch.com/2009/11/using-box-shadow-with-css3/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 00:20:54 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Box-Shadow]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=567</guid>
		<description><![CDATA[
			
				
			
		

I showed in a previous post how to use text-shadow with CSS3. Now it&#8217;s time to move on to something that&#8217;s just about as exciting, using Box-Shadow with CSS3. Throw it on a div, on a table, on an image.. anything goes! Of course it doesn&#8217;t work in every browser, but then again not much [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F11%2Fusing-box-shadow-with-css3%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F11%2Fusing-box-shadow-with-css3%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img class="alignnone" style="border:3px solid #ddd; margin:0 0 15px 0; -webkit-box-shadow: 0px 0px 7px #2178c7; -moz-box-shadow: 0px 0px 7px #2178c7" title="box shadow" src="http://webdesignandsuch.com/imagesForPosts/box-shadow.jpg" alt="" width="422" height="211" /></p>
<p>I showed in a <a href="http://webdesignandsuch.com/2009/11/using-text-shadow-with-css3/">previous post</a> how to use text-shadow with CSS3. Now it&#8217;s time to move on to something that&#8217;s just about as exciting, using <strong>Box-Shadow with CSS3</strong>. Throw it on a div, on a table, on an image.. anything goes! Of course it doesn&#8217;t work in every browser, but then again not much I talk about on this site does!</p>
<p>Check out the demo to see some examples and then keep reading to find out how to use <strong>Box-Shadow</strong>.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/box-shadow/box-shadow.html">View Demo</a><br />
<span id="more-567"></span><br />
Below are the examples from the demo page, with the code below it which made the shadow. For each shadow, you need to declare the dimensions for <strong>-webkit-box-shadow:</strong> and <strong> -moz-box-shadow:</strong>, which takes care of any browser that supports the box-shadow at this point.</p>
<p>The three numbers are similar to using text-shadow with CSS3, the first number is <strong>how far right</strong> the shadow is from the &#8220;box&#8221;, the next number is <strong>how far below</strong>, and the final number is the <strong>amount of blur</strong> for the shadow. Finally, you <strong>declare the color</strong> of the shadow.</p>
<p>You&#8217;ll see on a couple of them I used the awesome border-radius to show how the shadow wraps around a rounded corner. If you need a refresher on the border-radius declarations, <a href="http://webdesignandsuch.com/2009/10/rounded-corners-with-css3-border-radius/">look here</a>. If you want to check out some examples and code of text-shadow, <a href="http://webdesignandsuch.com/2009/11/using-text-shadow-with-css3/">look here</a>.</p>
<div class="codeBox" ><img class="alignnone" title="nice" src="http://webdesignandsuch.com/posts/box-shadow/rico.jpg" alt="" width="400" height="300" style="-webkit-box-shadow: 2px 2px 4px #000; -moz-box-shadow: 2px 2px 4px #000"/></p>
<p>{<br />-webkit-box-shadow: 2px 2px 4px #000; <br />-moz-box-shadow: 2px 2px 4px #000<br />}</div>
<div class="codeBox" style="margin-top:20px"><img class="alignnone" title="nice" src="http://webdesignandsuch.com/posts/box-shadow/rico.jpg" alt="" width="400" height="300" style="-webkit-box-shadow: 6px 6px 6px #444; -moz-box-shadow: 6px 6px 6px #444"/></p>
<p>{<br />-webkit-box-shadow: 6px 6px 6px #444;<br />-moz-box-shadow: 6px 6px 6px #444<br />}</div>
<div class="codeBox" style="margin-top:20px"><img class="alignnone" title="nice" src="http://webdesignandsuch.com/posts/box-shadow/rico.jpg" alt="" width="400" height="300" style="-webkit-box-shadow: 4px 4px 6px #fc6; -moz-box-shadow: 4px 4px 6px #FF66CC"/></p>
<p>{<br />-webkit-box-shadow: 4px 4px 6px #F6C;<br />-moz-box-shadow:4px 4px 6px #F6C<br />}</div>
<div class="codeBox" style="margin-top:20px"><img class="alignnone" title="nice" src="http://webdesignandsuch.com/posts/box-shadow/rico.jpg" alt="" width="400" height="300" style="-webkit-box-shadow: 6px 6px 10px #000; -moz-box-shadow: 6px 6px 10px #000; -webkit-border-radius:12px; -moz-border-radius:12px; border:15px solid #FF9900"/></p>
<p>{<br />-webkit-box-shadow: 6px 6px 10px #000; <br />-moz-box-shadow: 6px 6px 10px #000;<br />-webkit-border-radius:12px;<br />
-moz-border-radius:12px; <br />border:15px solid #F90<br />}</div>
<div class="codeBox" style="margin-top:20px"><img class="alignnone" title="nice" src="http://webdesignandsuch.com/posts/box-shadow/rico.jpg" alt="" width="400" height="300" style="-webkit-box-shadow: 6px 6px 10px #990; -moz-box-shadow: 6px 6px 10px #990; -webkit-border-radius:12px; -moz-border-radius:12px; border:12px solid #000"/></p>
<p>{<br />-webkit-box-shadow: 6px 6px 10px #990; <br />-webkit-border-radius:12px; <br />-moz-box-shadow: 6px 6px 10px #990;<br />-moz-border-radius:12px; <br />border:12px solid #000<br />}</div>
<div class="codeBox" style="margin-top:20px"><img class="alignnone" title="nice" src="http://webdesignandsuch.com/posts/box-shadow/rico.jpg" alt="" width="400" height="300" style="-webkit-box-shadow: 0px 0px 20px #6F0; -moz-box-shadow: 0px 0px 20px #66FF00"/></p>
<p>{<br />-webkit-box-shadow: 0px 0px 20px #6F0;<br />-moz-box-shadow: 0px 0px 20px #6F0<br />}</div>
<div class="codeBox" style="margin-top:20px"><img class="alignnone" title="nice" src="http://webdesignandsuch.com/posts/box-shadow/rico.jpg" alt="" width="400" height="300" style="-webkit-box-shadow: 0px 0px 30px #000; -moz-box-shadow: 0px 0px 30px #000"/></p>
<p>{<br />-webkit-box-shadow: 0px 0px 30px #000; <br />-moz-box-shadow: 0px 0px 30px #000<br />}</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/11/using-box-shadow-with-css3/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using Text-Shadow with CSS3</title>
		<link>http://webdesignandsuch.com/2009/11/using-text-shadow-with-css3/</link>
		<comments>http://webdesignandsuch.com/2009/11/using-text-shadow-with-css3/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 19:03:07 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Text-Shadow]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=538</guid>
		<description><![CDATA[
			
				
			
		

Remember the old days when the only way to create a shadow on text was to make it an image? That&#8217;s good for search engines..right? Oh sure, just use some image replacement and then the search engines can read it. Not so easy for text edits in the future. Or for changing the color of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F11%2Fusing-text-shadow-with-css3%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F11%2Fusing-text-shadow-with-css3%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img alt="" src="http://webdesignandsuch.com/imagesForPosts/text-shadow.jpg" title="CSS3 text shadow" class="alignnone" width="422" height="211" style="border:3px solid #bbb; margin:0 0 15px 0"/></p>
<p>Remember the old days when the only way to create a shadow on text was to make it an image? <em>That&#8217;s good for search engines..right?</em> Oh sure, just use some image replacement and then the search engines can read it. Not so easy for text edits in the future. Or for changing the color of the text or the background behind the text.</p>
<p><strong>Fastforward to CSS3</strong>. Now we can define a shadow behind live text on a website. <em>Wiggity whaaat?</em> That&#8217;s right, simply with some good old CSS. Of course you&#8217;ll need to use a real browser, as of any other cool CSS technique, but I won&#8217;t even begin to go into that topic. <strong>So why is this so great?</strong></p>
<ul>
<li><strong>Search engines can read the text</strong></li>
<li><strong>Easily change the color of the text</strong></li>
<li><strong>Easily change the color, size, or blur of the shadow</strong></li>
<li><strong>Easily change the background color or image behind the text</strong></li>
<li><strong>Your friends will be like<em> totally impressed</em></strong></li>
</ul>
<p>An example of this is the title to every article on this lil website of mine. Do you see the shadow behind the title &#8220;<strong>Using Text-Shadow with CSS3</strong>&#8220;? If you don&#8217;t for the love of god.. <a href="http://www.mozilla.com/en-US/firefox/personal.html">DOWNLOAD FIREFOX</a>! Check out the demo for some more examples of text-shadow created with CSS3, and then continue reading to learn how to write the CSS.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/text-shadow/text-shadow.html">View Demo</a></p>
<p><span id="more-538"></span></p>
<p>The CSS to create the text-shadow is pretty simple. It&#8217;s written like this:</p>
<p> <strong>{text-shadow: 2px 2px 4px #000}</strong> </p>
<p>The first number is how far right of the text the shadow should go, the second is how far below the text, and the final number is the amount of blur to apply to the shadow. Then of course the color of the shadow is declared.</p>
<p>You can see below the examples from the demo page, and below them are the CSS styles that create each effect.</p>
<div class="codeBox">
<h1 style="color:#000; text-shadow:2px 2px 4px #000">H1 with text-shadow applied.</h1>
<p>{color:#000; text-shadow:2px 2px 4px #000}</p></div>
<p></p>
<div class="codeBox">
<h1 style="color:#000; text-shadow:2px 2px 8px #000">More blur applied to the shadow.</h1>
<p>{color:#000; text-shadow:2px 2px 8px #000}</p></div>
<p></p>
<div class="codeBox">
<h1 style="color:#000; text-shadow:4px 4px 4px #CCC; line-height:25px">Same blur, more distance, lighter color.</h1>
<p>{color:#000; text-shadow:4px 4px 4px #CCC}</p></div>
<p></p>
<div class="codeBox">
<h1 style="color:#006; text-shadow:2px 2px 4px #00C">Using color for the shadow.</h1>
<p>{color:#006; text-shadow:2px 2px 4px #00C}</p></div>
<p></p>
<div class="codeBox">
<h1 style="color:#F09; text-shadow:2px 2px 5px #F6F">Another example of color.</h1>
<p>{color:#F09; text-shadow:2px 2px 5px #F6F}</p></div>
<p></p>
<p>In this next example you can see how you can create a beveled look by using a shadow that goes zero pixels to either side, but goes 1 pixel straight up above the text.</p>
<div class="codeBox">
<h1 style="color:#090; text-shadow:0px -1px 0px #000">Create a beveled look.</h1>
<p>{color:#090; text-shadow:0px -1px 0px #000}</p>
</div>
<p><strong>So there it is, creating text-shadows with CSS3.</strong> You might also want to check out a <a href="http://webdesignandsuch.com/2009/10/rounded-corners-with-css3-border-radius/">recent article</a> where I show how to use border-radius with CSS3; (which is how the rounded corners on these divs above were created).</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/11/using-text-shadow-with-css3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create a Shiny &#8220;Web 2.0&#8243; Button</title>
		<link>http://webdesignandsuch.com/2009/10/create-a-shiny-web-2-0-button/</link>
		<comments>http://webdesignandsuch.com/2009/10/create-a-shiny-web-2-0-button/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 01:20:39 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=503</guid>
		<description><![CDATA[
			
				
			
		

Ya.. I said &#8220;Web 2.0&#8220;.. what?
Well if you&#8217;re still here after that, here&#8217;s the deal. I was reading an interesting tutorial about creating a button similar to the one found on the Campaign Monitor website. I actually went ahead and created the button, I always love seeing the approach other designers take at creating things [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F10%2Fcreate-a-shiny-web-2-0-button%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F10%2Fcreate-a-shiny-web-2-0-button%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img class="alignnone" style="border:3px solid #ddd; margin:0 0 15px 0" title="Shiny Button" src="http://webdesignandsuch.com/imagesForPosts/shiny-button.jpg" alt="" width="422" height="211" /></p>
<p>Ya.. I said &#8220;<strong>Web 2.0</strong>&#8220;.. what?</p>
<p>Well if you&#8217;re still here after that, here&#8217;s the deal. I was reading an interesting tutorial about creating a button similar to the one found on the <a href="http://www.campaignmonitor.com/designer/" target="_blank">Campaign Monitor website</a>. I actually went ahead and created the button, I always love seeing the approach other designers take at creating things in Photoshop.</p>
<p>Well after I created it I figured I may as well put the PSD file up here for anyone that wants to use it. I&#8217;ll give the CSS code to add it to your website as a CSS sprite also. Now I need to give credit where credit is due. The CSS code, and the tutorial of how to make the button are from Jacob Gube over at <a href="http://sixrevisions.com/tutorials/photoshop-tutorials/how-to-create-a-slick-and-clean-button-in-photoshop/" target="_blank">Six Revisions</a>. Check out that link if you want the step by step of how to make this button. </p>
<p>I&#8217;m really putting it up here so I&#8217;ll have easy access to the PSD file in the future so I can download it no-matter where I am, make a few color adjustments, copy the CSS code, and have a new button for whatever I&#8217;m working on that day. Check out the demo to see the button in action, and feel free to download the PSD file of my version of the button. <em>Keep reading for the CSS code.</em></p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/shiny-button/">View Demo</a></p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/shiny-button/shiny-button.psd">Download PSD File</a></p>
<p><span id="more-503"></span></p>
<p>Below is the CSS code for your button and the rollover effect.</p>
<div class="codeBox">.button {<br />
display:block;<br />
width:250px;<br />
height:50px;<br />
text-indent:-9999px;<br />
}<br />
.button a {<br />
display:block;<br />
width:100%;<br />
height:100%;<br />
background:url(button.png) no-repeat top left;<br />
outline:none;<br />
}<br />
.button a:hover {<br />
background-position:0 -50px;<br />
}<br />
body {<br />
margin-left: 0px;<br />
margin-top: 0px;<br />
margin-right: 0px;<br />
margin-bottom: 0px;<br />
}</div>
<p>Below is the XHTML code to put the button on your page.</p>
<div class="codeBox">&lt;p class=&#8221;button&#8221;&gt;&lt;a href=&#8221;link.html&#8221;&gt;Button Text&lt;/a&gt;&lt;/p&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/10/create-a-shiny-web-2-0-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change the default Background Color of Text on Selection with CSS</title>
		<link>http://webdesignandsuch.com/2009/10/change-the-default-background-color-of-text-on-selection-with-css/</link>
		<comments>http://webdesignandsuch.com/2009/10/change-the-default-background-color-of-text-on-selection-with-css/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 23:22:07 +0000</pubDate>
		<dc:creator>ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Text Selection]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=481</guid>
		<description><![CDATA[
			
				
			
		

Here&#8217;s another interesting thing you can do with your CSS to style your website. We&#8217;ve all selected text from a webpage with our cursor before right? But most likely you never put any thought into what the default background color of the text was when you were selecting it. That is unless the website has [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px; margin-bottom:10px">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F10%2Fchange-the-default-background-color-of-text-on-selection-with-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=?url=http%3A%2F%2Fwebdesignandsuch.com%2F2009%2F10%2Fchange-the-default-background-color-of-text-on-selection-with-css%2F&amp;style=normal" height="61" width="51" /><br />
			</a>
		</div>
<p><img alt="" src="http://webdesignandsuch.com/posts/text-selection/colors.gif" title="CSS" class="alignnone" width="422" height="211"  style="border:3px solid #ddd; margin:0 0 15px 0"/><br />
<strong>Here&#8217;s another interesting thing you can do with your CSS to style your website.</strong> We&#8217;ve all selected text from a webpage with our cursor before right? But most likely you never put any thought into what the default background color of the text was when you were selecting it. That is unless the website has a blue background and you can&#8217;t see what you&#8217;re selecting because the default background color of text on selection is blue, causing it to blend in. </p>
<p>Lets get right to the example I set up so you can see what I&#8217;m talking about. Not only can you control the background color of the text when you select it with your cursor, but you can also change the color of the text itself on select.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/text-selection/">View Demo</a><br />
<span id="more-481"></span></p>
<p>So I&#8217;m not even going to get into the whole <em>&#8220;This only works in this browser, this version, blah blah&#8221;</em>. I assume anyone using this website knows the ins and outs of browsers and uses a <strong><a href="http://www.mozilla.com/en-US/firefox/personal.html">real browser</a></strong>. That being said, here is the code I used to change the colors on the demo page.</p>
<div class="codeBox">#second p::selection {<br />
background:#F3F;<br />
}<br />
#second p::-moz-selection {<br />
background:#F3F;<br />
}</p>
<p>#third p::selection {<br />
background:#F93; color:#339;<br />
}<br />
#third p::-moz-selection {<br />
background:#F93; color:#339;<br />
}</p>
<p>#forth p::selection {<br />
background:#000; color:#FFF<br />
}<br />
#forth p::-moz-selection {<br />
background: #000; color:#FFF<br />
}</p></div>
<p>So that&#8217;s all there is to it. One of those things that might not make or break a website, but is a nice touch to make your site even more custom, or perhaps even more user friendly.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/2009/10/change-the-default-background-color-of-text-on-selection-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
