<?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/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesignandsuch.com</link>
	<description>a Beantown Design Production</description>
	<lastBuildDate>Thu, 17 May 2012 23:40:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Using fancyBox for Responsive Google Maps</title>
		<link>http://webdesignandsuch.com/using-fancybox-for-responsive-google-maps/</link>
		<comments>http://webdesignandsuch.com/using-fancybox-for-responsive-google-maps/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 15:30:37 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Fancybox]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Responsive]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=3276</guid>
		<description><![CDATA[The latest release of fancyBox is responsive, so now your maps can auto adjust based on your browser window size!]]></description>
			<content:encoded><![CDATA[<p>The popular jQuery lightbox fancyBox recently had a major overhaul. The new version has better transitions, more options, and most importantly a <strong>responsive layout</strong>.</p>
<p>One great way to use fancyBox is to open Google Maps over your webpage. If you need to have a map but don&#8217;t have enough room on the page to embed the map you can integrate fancyBox with Google Maps and open the enlarged map when you click on a link. Checkout the demo and download. Since this latest release of fancyBox is responsive the frame around the map resizes based on the size of the browser window! <img src='http://webdesignandsuch.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div class="postButtons">
<div class="double"><a href="http://webdesignandsuch.com/posts/fancybox-download/google-maps-fancybox/fancybox-google-maps.html" class="demo">Demo</a><a href="http://webdesignandsuch.com/posts/fancybox-download/google-maps-fancybox/fancybox-g-maps.zip" class="download">Download</a></div>
</div>
<p><strong>Note:</strong> The new version of fancyBox has different licensing, be sure to visit the website for full details to make sure you are using it correctly, and for all the customization details.</p>
<p><a href="http://fancyapps.com/fancybox/" target="_blank">http://fancyapps.com/fancybox/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/using-fancybox-for-responsive-google-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Responsive YouTube Videos with fancyBox</title>
		<link>http://webdesignandsuch.com/responsive-youtube-videos-with-fancybox/</link>
		<comments>http://webdesignandsuch.com/responsive-youtube-videos-with-fancybox/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 14:30:09 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Fancybox]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Responsive]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=3257</guid>
		<description><![CDATA[The newest version of fancyBox has a responsive layout, making it the perfect solution for your responsive YouTube video needs.]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://wp.me/p11izc-oK">previous post</a> I showed how to use fancyBox with YouTube videos. Responsive website layouts are the hottest thing on the web right now, which has left developers looking for solutions for responsive sliders and galleries. Luckily a new version of fancyBox was recently released, one of the major updates being the ability to resize images or videos depending on the screen size!</p>
<p><strong>Old FancyBox video / browser large.</strong><br />
<img src="http://webdesignandsuch.com/wp-content/uploads/responsive-videos-1.jpg" alt="fancybox youtube videos" title="fancybox youtube videos" width="575" height="465" class="alignnone size-full wp-image-3259" /></p>
<p><strong>Old FancyBox video / browser small (and cutoff). <img src='http://webdesignandsuch.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </strong><img src="http://webdesignandsuch.com/wp-content/uploads/responsive-videos-2.jpg" alt="using fancybox with youtube videos" title="using fancybox with youtube videos" width="400" height="371" class="alignnone size-full wp-image-3260" /></p>
<p><strong>New FancyBox video / browser large.</strong><br />
<img src="http://webdesignandsuch.com/wp-content/uploads/responsive-videos-4.jpg" alt="responsive youtube" title="responsive youtube" width="575" height="381" class="alignnone size-full wp-image-3261" /></p>
<p><strong>New FancyBox video / browser small (and auto resized!). <img src='http://webdesignandsuch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong><img src="http://webdesignandsuch.com/wp-content/uploads/responsive-videos-3.jpg" alt="youtube with fancybox" title="youtube with fancybox" width="400" height="294" class="alignnone size-full wp-image-3262" /></p>
<div class="postButtons">
<div class="double"><a href="http://webdesignandsuch.com/posts/fancybox-download/responsive-youtube-videos/fancybox-youtube.html" class="demo">Demo</a><a href="http://webdesignandsuch.com/posts/fancybox-download/responsive-youtube-videos/fancybox-youtube-videos.zip" class="download">Download</a></div>
</div>
<p><strong>Note:</strong> The new version of fancyBox has different licensing, be sure to visit the website for full details to make sure you are using it correctly, and for all the customization details.</p>
<p><a href="http://fancyapps.com/fancybox/" target="_blank">http://fancyapps.com/fancybox/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/responsive-youtube-videos-with-fancybox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force a vertical scroll bar in non-IE browsers to avoid page jump</title>
		<link>http://webdesignandsuch.com/force-vertical-scroll-bar-avoid-page-jump/</link>
		<comments>http://webdesignandsuch.com/force-vertical-scroll-bar-avoid-page-jump/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 13:45:26 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=2750</guid>
		<description><![CDATA[Have you noticed that when you click from a shorter webpage to a taller webpage the content jumps to make room for the vertical scroll bar? This problem can be fixed by forcing the vertical scroll bar on ALL pages with CSS.]]></description>
			<content:encoded><![CDATA[<p><strong>If you code websites you&#8217;ve noticed this problem..</strong> </p>
<p>Webpages that don&#8217;t fit vertically in the browser window have a vertical scroll bar, pages that do fit in the browser window don&#8217;t have this scroll bar. All is great until you click from a short page to a tall page and the content &#8216;jumps&#8217;, in order to make room for the scroll bar. If you&#8217;re a developer you&#8217;re used to this and probably don&#8217;t even notice it. I&#8217;ve had multiple clients ask me why the page jumps and have had to explain the reasoning, just to hear <em>&#8220;oooh that&#8217;s weeeird, isn&#8217;t it???&#8221;</em>. No, I just explained it. Anyway, to avoid this conversation, add the following CSS to your style sheet. This code forces the vertical scroll bar, and <em>voila</em>, no more page jumps or calls from the client.</p>
<pre class="brush: css; title: ; notranslate">
html { overflow-y: scroll }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/force-vertical-scroll-bar-avoid-page-jump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix Sup Sub line-height problem with CSS</title>
		<link>http://webdesignandsuch.com/how-to-fix-sup-sub-line-height-problem-with-css/</link>
		<comments>http://webdesignandsuch.com/how-to-fix-sup-sub-line-height-problem-with-css/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 13:42:53 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=2397</guid>
		<description><![CDATA[The superscript and subscript tags can push lines of text further apart from each other, ruining the line-height. Here is how to correct this issue with CSS.]]></description>
			<content:encoded><![CDATA[<p>If you code CSS / XHTML, you are most likely familiar with the Superscript  <sup></sup> and Subscript <sub></sub>  tags. If you use these tags in a situation where there are multiple lines of text you might run into a common problem. The problem is that the Super or Subscript characters push the lines of text further apart to make room for the character. This leaves you with an ugly looking block of text, with 2 lines with too much space between them. What needs to be done is to undo this default setting of pushing the lines apart. Here&#8217;s is the CSS to do just this. You might want to add this to your CSS reset style sheet, so you don&#8217;t run into this problem in the future.</p>
<pre class="brush: css; title: ; notranslate">
sub, sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}
sup {
	top: -0.5em;
}
sub {
	bottom: -0.25em;
}
</pre>
<p><em>Here&#8217;s another method some people use which you can try.</em></p>
<pre class="brush: css; title: ; notranslate">
sup,
sub {
	height: 0;
	line-height: 1;
	vertical-align: baseline;
	_vertical-align: bottom;
	position: relative;
}
sup {
	bottom: 1ex;
}
sub {
	top: .5ex;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/how-to-fix-sup-sub-line-height-problem-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8 Great Font Stacks for Web Design</title>
		<link>http://webdesignandsuch.com/8-great-font-stacks-for-web-design/</link>
		<comments>http://webdesignandsuch.com/8-great-font-stacks-for-web-design/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 13:45:48 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=2688</guid>
		<description><![CDATA[Here's a great collection of 8 font stacks, perfect for your next website design project.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nice collection of font stacks for your website project, original code from the article &#8220;<a href="http://www.sitepoint.com/eight-definitive-font-stacks/" target="_blank">eight definitive font stacks</a>&#8221; on SitePoint.</p>
<h2 style='font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;'>Times New Roman-based stack</h2>
<h2 style='font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;'>Modern Georgia-based serif stack</h2>
<h2 style='font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;'>Traditional Garamond-based serif stack</h2>
<h2 style='font-family: Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans serif;'>Helvetica/Arial-based sans serif stack</h2>
<h2 style='font-family: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans serif;'>Verdana-based sans serif stack</h2>
<h2 style='font-family: "Segoe UI", Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans serif;'>Trebuchet-based sans serif stack</h2>
<h2 style='font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif;'>Impact-based sans serif stack</h2>
<h2 style='font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;'>Monospace stack</h2>
<pre class="brush: css; title: ; notranslate">/****************
 * From the article &quot;8 Definitive Web Font Stacks&quot;
 * by Michael Tuck
 * http://www.sitepoint.com/article/eight-definitive-font-stacks
 * Copyright SitePoint 2008
 */

/* Times New Roman-based stack */
font-family: Cambria, &quot;Hoefler Text&quot;, Utopia, &quot;Liberation Serif&quot;, &quot;Nimbus Roman No9 L Regular&quot;, Times, &quot;Times New Roman&quot;, serif;

/* Modern Georgia-based serif stack */
font-family: Constantia, &quot;Lucida Bright&quot;, Lucidabright, &quot;Lucida Serif&quot;, Lucida, &quot;DejaVu Serif,&quot; &quot;Bitstream Vera Serif&quot;, &quot;Liberation Serif&quot;, Georgia, serif;

/* Traditional Garamond-based serif stack */
font-family: &quot;Palatino Linotype&quot;, Palatino, Palladio, &quot;URW Palladio L&quot;, &quot;Book Antiqua&quot;, Baskerville, &quot;Bookman Old Style&quot;, &quot;Bitstream Charter&quot;, &quot;Nimbus Roman No9 L&quot;, Garamond, &quot;Apple Garamond&quot;, &quot;ITC Garamond Narrow&quot;, &quot;New Century Schoolbook&quot;, &quot;Century Schoolbook&quot;, &quot;Century Schoolbook L&quot;, Georgia, serif;

/* Helvetica/Arial-based sans serif stack */
font-family: Frutiger, &quot;Frutiger Linotype&quot;, Univers, Calibri, &quot;Gill Sans&quot;, &quot;Gill Sans MT&quot;, &quot;Myriad Pro&quot;, Myriad, &quot;DejaVu Sans Condensed&quot;, &quot;Liberation Sans&quot;, &quot;Nimbus Sans L&quot;, Tahoma, Geneva, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans serif;

/* Verdana-based sans serif stack */
font-family: Corbel, &quot;Lucida Grande&quot;, &quot;Lucida Sans Unicode&quot;, &quot;Lucida Sans&quot;, &quot;DejaVu Sans&quot;, &quot;Bitstream Vera Sans&quot;, &quot;Liberation Sans&quot;, Verdana, &quot;Verdana Ref&quot;, sans serif;

/* Trebuchet-based sans serif stack */
font-family: &quot;Segoe UI&quot;, Candara, &quot;Bitstream Vera Sans&quot;, &quot;DejaVu Sans&quot;, &quot;Bitstream Vera Sans&quot;, &quot;Trebuchet MS&quot;, Verdana, &quot;Verdana Ref&quot;, sans serif;

/* Impact-based sans serif stack */
font-family: Impact, Haettenschweiler, &quot;Franklin Gothic Bold&quot;, Charcoal, &quot;Helvetica Inserat&quot;, &quot;Bitstream Vera Sans Bold&quot;, &quot;Arial Black&quot;, sans serif;

/* Monospace stack */
font-family: Consolas, &quot;Andale Mono WT&quot;, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, Monaco, &quot;Courier New&quot;, Courier, monospace;</pre>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/8-great-font-stacks-for-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Zebra Striping to a Table with jQuery</title>
		<link>http://webdesignandsuch.com/add-zebra-striping-to-a-table-with-jquery/</link>
		<comments>http://webdesignandsuch.com/add-zebra-striping-to-a-table-with-jquery/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 23:57:52 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=960</guid>
		<description><![CDATA[Learn how to use jQuery to apply zebra striping to a table; a technique which is cross browser compatible. Yup, even your favorite browser Internet Explorer can pull this one off!]]></description>
			<content:encoded><![CDATA[<p>In a <strong><a href="http://webdesignandsuch.com/2010/08/add-zebra-striping-to-a-table-with-css3/">previous post</a></strong> I showed how to use CSS3 to add a background color to every other row in a table, a technique called &#8220;zebra striping&#8221;. While this is a great technique, it doesn&#8217;t work in browsers that don&#8217;t support certain CSS3 features, such as Internet Explorer. By using a little jQuery we can make sure that every other row will have the background color, regardless of what browser the website user is on. Check out the demo and then grab the code for your project.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/zebra-striping/index2.html">View Demo</a><br />
<span id="more-960"></span><br />
Copy and paste the following code into the head of your HTML file. Then add a table with multiple rows and you should see your table have different colors in every other row, just like the demo. </p>
<p>The code below is doing 3 things. First it is calling jQuery to be attached to the file. Second, we are assigning a background-color to the CSS class &#8220;odd&#8221;. The last step is using jQuery to automatically add the class &#8220;odd&#8221; to every other row. Pretty simple trick that works across browsers.</p>
<div class="codeBox" style="overflow:hidden">
<pre id="line1">&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;

&lt;style type="text/css"&gt;
&lt;!--
.odd {background: #caf2fe;}
--&gt;
&lt;/style&gt;

&lt;script type="text/javascript"&gt;
 $(document).ready(function(){
 $("tr:odd").addClass("odd");
 });
&lt;/script&gt;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/add-zebra-striping-to-a-table-with-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Add Zebra Striping to a Table with CSS3</title>
		<link>http://webdesignandsuch.com/add-zebra-striping-to-a-table-with-css3/</link>
		<comments>http://webdesignandsuch.com/add-zebra-striping-to-a-table-with-css3/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 23:39:04 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://webdesignandsuch.com/?p=952</guid>
		<description><![CDATA[Zebra striping is a technique used to help the usability of a table in html. By coloring every other row in the table, it makes it easier for your eye to keep it's place. CSS3 makes this "uber" easy.]]></description>
			<content:encoded><![CDATA[<p>When you have a table on a website with a lot of rows it looks nice to add a background color to every other row. Just a subtle color change in every other row can help the human eye keep it&#8217;s place as it looks both across the row and down the page across the rows vertically. This technique is called &#8220;zebra striping&#8221;.</p>
<p>Sure you can add a CSS class to every other row manually, but what happens if you need to re-arrange or delete some rows? Having to go back and manually make sure every other row has a class so the zebra striping is on every other row is no longer a suitable solution. Luckily with the power of CSS3 this is no longer necessary. Check out the demo, and then grab the CSS code for your project.</p>
<p><a class="demo-link" href="http://webdesignandsuch.com/posts/zebra-striping/index.html">View Demo</a><br />
<span id="more-952"></span><br />
All you need to do to add a background color to every other row in your table is add the following to your CSS file. This won&#8217;t work in Internet Explorer (big surprise), so if you really need to support every browser including IE, then check out how to use <a href="http://webdesignandsuch.com/2010/08/add-zebra-striping-to-a-table-with-jquery/"><strong>jQuery to apply zebra striping to a table</strong></a>.</p>
<div class="codeBox">
<pre id="line1">tbody tr:nth-child(odd) {
   background-color:#a9cdeb
}
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/add-zebra-striping-to-a-table-with-css3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Target the first paragraph on a page or section with CSS</title>
		<link>http://webdesignandsuch.com/target-the-first-paragraph-on-a-page-or-section-with-css/</link>
		<comments>http://webdesignandsuch.com/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>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></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 [...]]]></description>
			<content:encoded><![CDATA[<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/target-the-first-paragraph-on-a-page-or-section-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to create a Popup with CSS and Javascript</title>
		<link>http://webdesignandsuch.com/how-to-create-a-popup-with-css-and-javascript/</link>
		<comments>http://webdesignandsuch.com/how-to-create-a-popup-with-css-and-javascript/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 17:27:23 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Javascript]]></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 [...]]]></description>
			<content:encoded><![CDATA[<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>
<div class="postButtons">
<div class="double"><a class="demo" href="http://webdesignandsuch.com/posts/css-popup/css-popup.html">Demo</a><a class="download" href="http://webdesignandsuch.com/posts/css-popup/css-popup.zip">Download</a></div>
</div>
<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>
<pre class="brush: xml; title: ; notranslate">&lt;div id=&quot;blanket&quot; style=&quot;display:none&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;popUpDiv&quot; style=&quot;display:none&quot;&gt;

&lt;a href=&quot;#&quot; onclick=&quot;popup('popUpDiv')&quot; &gt;Click to Close CSS Pop Up&lt;/a&gt;
&lt;/div&gt;
&lt;a href=&quot;#&quot; onclick=&quot;popup('popUpDiv')&quot;&gt;Click to Open CSS Pop Up&lt;/a&gt;</pre>
<p>If you want the popup to load on <strong>page load</strong>, put the following in your body tag.</p>
<pre class="brush: xml; title: ; notranslate">&lt;body   onload=&quot;popup('popUpDiv')&quot;&gt;</pre>
<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>
<pre class="brush: css; title: ; notranslate">#blanket {
background-color:#111;
opacity: 0.65;
*background:none;
position:absolute;
z-index: 9001;
top:0px;
left:0px;
width:100%;
}

#popUpDiv {
position:absolute;
background:url(pop-back.jpg) no-repeat;
width:400px;
height:400px;
border:5px solid #000;
z-index: 9002;
}</pre>
<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>The popup automatically centers itself in the screen. To adjust this for your popup, open the javascript file. You&#8217;ll see numbers for the height and width: <strong>window_width=window_width/2-200;//200 is half popup&#8217;s width</strong></p>
<p>Change &#8220;200&#8243; so it&#8217;s half the width of yours; do the same for the line that declares the height.</p>
<p><strong>Credits:</strong><br />
<a href="http://www.pat-burt.com/web-development/how-to-do-a-css-popup-without-opening-a-new-window/" target="_blank">Script Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignandsuch.com/how-to-create-a-popup-with-css-and-javascript/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Simple form styling with CSS</title>
		<link>http://webdesignandsuch.com/simple-form-styling-with-css/</link>
		<comments>http://webdesignandsuch.com/simple-form-styling-with-css/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 14:07:15 +0000</pubDate>
		<dc:creator>mike ilz</dc:creator>
				<category><![CDATA[CSS]]></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 [...]]]></description>
			<content:encoded><![CDATA[<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/simple-form-styling-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

