<?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>Web Design, Icon Design, Freelance, Onur Oztaskiran - Monofactor &#187; reset</title>
	<atom:link href="http://www.monofactor.com/tag/reset/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monofactor.com</link>
	<description>Web design and development blog</description>
	<lastBuildDate>Thu, 08 Oct 2009 16:15:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>6 Default Selectors on My Base CSS for Every Project</title>
		<link>http://www.monofactor.com/6-default-selectors-on-my-base-css-for-every-project/</link>
		<comments>http://www.monofactor.com/6-default-selectors-on-my-base-css-for-every-project/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 07:40:03 +0000</pubDate>
		<dc:creator>Onur Oztaskiran</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Design & Dev. Tutorials]]></category>
		<category><![CDATA[base]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[reset]]></category>

		<guid isPermaLink="false">http://localhost/monofactor/?p=33</guid>
		<description><![CDATA[There’re so many times I find myself struggling with IE6 and 7 issues and some other misbehaviors when working on the css of my designs.
In order to shorten the time I waste on the css and to modify the elements a bit easier, I defined some common base selectors to use and they exist almost [...]]]></description>
			<content:encoded><![CDATA[<p>There’re so many times I find myself struggling with IE6 and 7 issues and some other misbehaviors when working on the css of my designs.</p>
<p>In order to shorten the time I waste on the css and to modify the elements a bit easier, I defined some common base selectors to use and they exist almost on every css file of my previous projects and this site’s css as well.</p>
<p>Doing that, I reset the default values for common elements and selectors, and then I restyle and organize those elements individually, wherever they are needed.<br />
<span id="more-33"></span></p>
<p>Here are my favourite fixes and resets for my possible troubles:</p>
<ul>
<li>
<h4>1- Settings for Headings</h4>
<p>Because IE6 displays the font-size and margin/padding properties for headings different than other browsers, I define preliminary standard values for the heading properties:</p>
<pre class="brush: css">
h1 {
font-size:138.5%;
}
</pre>
<p>IE6 renders the font sizes for headings differently (mostly for the typefaces like Georgia, Trebuchet MS, etc), so they need to be standardized for all browsers:</p>
<pre class="brush: css">
h1,h2,h3 {
margin:1em 0;
}

h2 {
font-size:123.1%;
}
h3 {
font-size:108%;
}
h1,h2,h3,h4,h5,h6 {
font-weight:bold;
}
</pre>
</li>
<li>
<h4>2-Hiding the Horizontal Rules</h4>
<p>As I sometimes divide content into divisions, it looks better and more organized by dividing with horizontal rules when site is viewed without stylesheet.  And of course, I hide them inside css:</p>
<pre class="brush: css">
hr {
display:none;
}
</pre>
</li>
<li>
<h4>3- Removing the Link Outlines</h4>
<p>Especially with Firefox view, <strong>a</strong> links get bordered and outlined on focus and active states.  It is annoying when it is not intented, so I deactivate the link outlines.</p>
<pre class="brush: css">
a {
outline: none;
}
</pre>
</li>
<li>
<h4>4- Preventing Linked Images Gain Borders</h4>
<p>Unstyled img elements gains borders when they are hyperlinked. I remove the possible image borders:</p>
<pre class="brush: css">
img {
outline: none;
}
</pre>
<p>However, as <a href="http://proxytuts.com/">Gareth</a> reminded me on his <a href="#comment-145">comment</a>; removing outlines may reduce accessibility. Removing outlines and borders on focus or hover will theorically disable browsing using tab key.</p>
<p>Unless you are not worried about this issue, you can use this hack.</li>
<li>
<h4>5- Resetting Margin and Paddings on My Common Elements</h4>
<p>Mostly because IE renders margins and paddings ratherly different than other major standards based browsers, I reset the paddings and margins for my form, paragraph, and list elements.</p>
<pre class="brush: css">
p, form, ul, ol, dt, dd {
margin:0;
padding:0;
}
</pre>
</li>
<li>
<h4>6- Clear Fix</h4>
<p>Almost in every project, I come to needing the float clearing divs or classes to attach. So I created a base class selector for clearing div and usually pick name from a comic hero.  Mostly I name it spiderman/batman =)</p>
<pre class="brush: css">
.batman:after {
content:&quot;.&quot;;
display:block;
height:0;
clear:both;
visibility:hidden;
}
.batman {display:inline-block;}
/* Hide from IE Mac */
.batman {display:block;}
/* End hide from IE Mac */
</pre>
</li>
</ul>
<p>Of course some of you might think if all of these settings are necessary, as some of the techniques may be altered with other shortcut selectors. These are just my kind of solutions, and I hope they help on your projects too.</p>
<p>There are many more techniques about base css documents and resetting selectors like <a href="http://developer.yahoo.com/yui/base/">Yahoo&#8217;s Base CSS</a> and <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Eric Meyer&#8217;s Reset CSS</a>. Just take a loot at them and see how timesaving they are.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monofactor.com/6-default-selectors-on-my-base-css-for-every-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
