<?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>CM &#187; CSS</title>
	<atom:link href="http://corymathews.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://corymathews.com</link>
	<description>Things I should remember and then some...</description>
	<lastBuildDate>Fri, 04 May 2012 16:56:43 +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>List Images</title>
		<link>http://corymathews.com/list-images/</link>
		<comments>http://corymathews.com/list-images/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 21:59:17 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Lists]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=16</guid>
		<description><![CDATA[In CSS List Images are such a simple topic that I have seen overlooked over and over. There is not much to it at all. Just one line of css. Example ul { list-style-image:url(picName.jpg); } Done in one short line. This will simply make every un-ordered list have an image in place of the dot. [...]]]></description>
			<content:encoded><![CDATA[<p>In CSS List Images are such a simple topic that I have seen overlooked over and over. There is not much to it at all. Just one line of css.</p>
<p>Example</p>
<pre name="code" class="css">ul { list-style-image:url(picName.jpg); }</pre>
<p>Done in one short line. This will simply make every un-ordered list have an image in place of the dot. So then an un-ordered List in XHTML such as:<br />
<span id="more-16"></span></p>
<pre name="code" class="html">
<ul>
<li>List Item 1</li>
<li>List Item 1</li>
<li>List Item 1</li>
</ul>
</pre>
<p>would look like<br />
<img src="http://corymathews.com/wp-content/uploads/2009/01/imglist.jpg" alt="imglist" title="imglist" width="98" height="71" class="alignnone size-full wp-image-216" /></p>
<p>(Note my list image is <img src="http://corymathews.com/wp-content/uploads/2009/01/smile.jpg" alt="smile" title="smile" width="10" height="10" class="alignnone size-full wp-image-215" />)</p>
<p>The only problem with this is that every unordered list will use this image. To fix this we will give the unordered list a class name this way we get to choose which list will show the image and which will use the default dot.</p>
<p>CSS:</p>
<pre name="code" class="css">ul.imgList { list-style-image:url(picName.jpg); }</pre>
<p>XHTML</p>
<pre name="code" class="html">
<ul class="imgList">
<li>List Item 1</li>
<li>List Item 1</li>
<li>List Item 1</li>
</ul>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/list-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Images Within Form Fields</title>
		<link>http://corymathews.com/images-within-form-fields/</link>
		<comments>http://corymathews.com/images-within-form-fields/#comments</comments>
		<pubDate>Sat, 03 May 2008 14:08:17 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Forms]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=65</guid>
		<description><![CDATA[Adding Background images to your form fields can be easily accomplished with CSS and can add wonders to the look of your forms as well as improve the usability for the user. Here is what we want to end up accomplishing. Adding images to your form fields is actually very simple. It works just like [...]]]></description>
			<content:encoded><![CDATA[<p>Adding Background images to your form fields can be easily accomplished with CSS and can  add wonders to the look of your forms as well as improve the usability for the user.</p>
<p>Here is what we want to end up accomplishing.<br />
<img src="http://www.osguide.net/img/tutorials/ImagesWithinFormFields_End.jpg" alt="End Result with a red star within the form field"></p>
<p>Adding images to your form fields is actually very simple. It works just like adding images to any other item on your page. Here is the CSS for how it is done.</p>
<pre class="prettyprint linenumstrigger linenums"> input {&lt;br /&gt;
background:url(img/redStar12.gif) left no-repeat;&lt;br /&gt;
padding: 3px 3px 3px 15px;&lt;br /&gt;
}</pre>
<p>This gives us something like this</p>
<p><img src="http://www.osguide.net/img/tutorials/ImagesWithinFormFields_1.jpg" alt="End Result with a red star within the form field"></p>
<p><a href="http://www.osguide.net/img/tutorials/src/formStyles.html" title="Form example with a red star within a form field">View it in action Here</a></p>
<p>You see that the input class specifies that I want to define this style to all input fields, This includes check boxes, radio buttons ect, with the exception of text areas. So this is a problem.</p>
<p>In my example here I am adding a red star to the input field to specify that the field is required. You notice the padding for the left is at 15 so that the user does not type over the image. This is a great way to indicate a required field.</p>
<p>But there is still the one problem. This is applied to all form input fields. So we need to declare it as a sub class instead. I am going to change the above CSS to solve this problem.</p>
<pre class="prettyprint linenumstrigger linenums"> input {&lt;br /&gt;
padding: 3px;&lt;br /&gt;
}</pre>
<p></p>
<pre class="prettyprint linenumstrigger linenums"> input.req {&lt;br /&gt;
background:url(img/redStar12.gif) left no-repeat;&lt;br /&gt;
padding: 3px 3px 3px 15px;&lt;br /&gt;
}</pre>
<p>So now you see that I have changed the input class to only add a little padding and a small border and I have added the second piece to only add the image on fields I specify with the class=req.</p>
<p><img src="http://www.osguide.net/img/tutorials/ImagesWithinFormFields_2.jpg" alt="End Result with a red star within the form field"></p>
<p><a href="http://www.osguide.net/img/tutorials/src/formStyles2.html" title="Form final result with a red star within the form field">Here is the final result.</a></p>
<p>I have seen this technique used on many websites. Some of the more common uses is for required fields like above, for username and password fields. As well as just making the input fields look better. </p>
<p>If you take a look at the search form here on osguide.net it uses this same technique for the search icon.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/images-within-form-fields/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WordPress Paging Style</title>
		<link>http://corymathews.com/wordpress-paging-style/</link>
		<comments>http://corymathews.com/wordpress-paging-style/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 07:42:53 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Styles]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=56</guid>
		<description><![CDATA[Recently Jens Törnell over at http://www.jenst.se/ wrote a plugin that &#8220;I made a paging navigation plugin for WordPress that will be an alternative to the “Next page” and “Previous page“. Instead it uses numbers which makes it easier for users to choose what page to go to. It also makes a tighter internal link structure [...]]]></description>
			<content:encoded><![CDATA[<p>Recently Jens Törnell over at <a href="http://www.jenst.se/" target="_blank">http://www.jenst.se/</a> wrote a plugin that</p>
<blockquote><p>&#8220;I made a paging navigation plugin for WordPress that will be an alternative to the “Next page” and “Previous page“. Instead it uses numbers which makes it easier for users to choose what page to go to. It also makes a tighter internal link structure which makes it easier for search engines to find your posts.&#8221;</p></blockquote>
<p>He included a couple basic themes, But earlier today I re-stylized the &#8220;tiny&#8221; theme to be this dark grey color scheme. So now I am going to share this with you.<br />
<span id="more-56"></span><br />
Here is a preview of the style.</p>
<p><img src="http://www.corymathews.com/wp-content/plugins/wp-page-numbers/tiny/preview.jpg"></p>
<p>Now the <a href="http://www.corymathews.com/wp-content/plugins/wp-page-numbers/tiny/wp-page-numbers.css" target="_blank">css for the style</a>. After you set up this plugin for yourself change the &#8220;tiny&#8221; style to the css I provided.</p>
<p>To get this wordpress plugin for yourself head over to <a href="http://www.jenst.se/2008/03/29/wp-page-numbers" target="_blank">http://www.jenst.se/2008/03/29/wp-page-numbers</a> and follow his instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/wordpress-paging-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CSS to Format Print Pages</title>
		<link>http://corymathews.com/using-css-to-format-print-pages/</link>
		<comments>http://corymathews.com/using-css-to-format-print-pages/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 22:28:52 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Print]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=46</guid>
		<description><![CDATA[The main problem addressed here is dealing with cross browser issues when using css style sheets to print. Recently at work one of the sites that we inherited, and now maintain, asked for me to change the way their website looks when it is being printed out. The site itself was using very basic css, [...]]]></description>
			<content:encoded><![CDATA[<p>The main problem addressed here is dealing with cross browser issues when using css style sheets to print.</p>
<p>Recently at work one of the sites that we inherited, and now maintain, asked for me to change the way their website looks when it is being printed out. The site itself was using very basic css, is still using tables for alignment, and has a flash header at the top of all the pages. I have never needed to stylize the way a web page prints so I was quite new to this. I did however know it could be done using an alternate css sheet.<br />
<span id="more-46"></span><br />
So I was off to search for my answers, I quickly came across 4 or 5 crappy attempts at explaining these alternate style sheets, and after piecing information together and some trial and error I managed to figured it out. Its turned out to be very simple for a basic site like the one I was editing. I could see how a much larger site such as my osguide.net would be a little tougher, and take longer. So that will wait until another day.</p>
<p>Regardless it all starts with a simple 1 line of code to call my new style sheet when the page is being printed:</p>
<pre name="code" class="css">&lt;link rel="stylesheet" type="text/css" media="print" href="print.css" /&gt;</pre>
<p>Its your normal call to an external CSS page except I changed the media to print, instead of screen.</p>
<p>That&#8217;s all fine and dandy, my new sheet is called only when I print the page out. Now the more annoying problems popped up, no background images were printed, as well as no flash. I expected the flash not be printed, but I figured it would print background images.</p>
<p>I did not want to print the navigation so I set the display for my navigation to none. The CSS for that is simple:</p>
<pre name="code" class="css">display:none;</pre>
<p>So my next goal is to get the flash to print. Up until now I have only been looking at the print preview in Opera, and so I decided it was time to take a look at in IE 7, Firefox 2 and Safari 3. IE 7 does print the flash, so does Firefox, but safari does not. This is definitely a large problem.</p>
<p>So I have Opera and Safari without a header, and IE 7 and FF with a header on the print previews. I am not one for CSS hacks, or alternate style sheets, so I had to come up with a different way to properly display my page.</p>
<p>I checked out a couple work-around&#8217;s using lists but they did not seem to work like they said it should&#8230; go figure. So I had to resort to a pretty lame workaround, until the browsers themselves get on the same page, or I find a better way to do this.</p>
<p>I ended up placing two new div tags. The first one around my flash header and the second around a new jpeg image right above my flash with a display of none.</p>
<p>So Now on my screen css I have a hidden image right above my flash, and then on the print css I hide my flash. This seems like a crappy work-around, but it works in all browsers without any css hacks.</p>
<p>My question now is does anyone else have a better way to do this without css hacks, or alternate style sheets? I know this can&#8217;t be the best way.</p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/using-css-to-format-print-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

