<?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>Bright Cherry &#187; CSS Tips &amp; Tricks</title>
	<atom:link href="http://www.brightcherry.co.uk/scribbles/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brightcherry.co.uk/scribbles</link>
	<description></description>
	<lastBuildDate>Tue, 20 Dec 2011 19:54:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>CSS- Using Float With List Item Bullets in I.E 6/7</title>
		<link>http://www.brightcherry.co.uk/scribbles/css-using-float-with-list-item-bullets-in-i-e-67/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/css-using-float-with-list-item-bullets-in-i-e-67/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 02:08:16 +0000</pubDate>
		<dc:creator>adm1n</dc:creator>
				<category><![CDATA[CSS Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=278</guid>
		<description><![CDATA[Note to self and everyone else having a breakdown over this issue, YOU CANNOT float a list in I.E 6 or 7 and have the bullets display. It took me way too long to realise that. I have searched high and low for a legitimate way of making it work (without using JavaScript), but apparently [...]]]></description>
			<content:encoded><![CDATA[<p>Note to self and everyone else having a breakdown over this issue, YOU CANNOT float a list in I.E 6 or 7 and have the bullets display. It took me way too long to realise that.</p>
<p>I have searched high and low for a legitimate way of making it work (without using JavaScript), but apparently it cannot be done. </p>
<p>For example, suppose I want the following effect:</p>
<p><img src="http://www.brightcherry.co.uk/images/blogimages/float-list-css.jpg" title="CSS- Using Float With List Item Bullets" alt="CSS- Using Float With List Item Bullets" /></p>
<p>The code to achieve the above effect is:</p>

<div class="wp_codebox"><table><tr id="p2783"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code" id="p278code3"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
li{
list-style-type:disc;
float:left;
margin:0 0 0 20px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
&lt;ul&gt;
 &lt;li&gt;List 2&lt;/li&gt;
 &lt;li&gt;List 2&lt;/li&gt;
 &lt;li&gt;List 3&lt;/li&gt;
 &lt;li&gt;List 4&lt;/li&gt;
 &lt;li&gt;List 5&lt;/li&gt;
 &lt;li&gt;List 6&lt;/li&gt;
&lt;/ul&gt;
&nbsp;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>However, in I.E 6/7 it looks like the following:</p>
<p><img src="http://www.brightcherry.co.uk/images/blogimages/float-list-css2.jpg" title="CSS- Using Float With List Item Bullets" alt="CSS- Using Float With List Item Bullets" /></p>
<p>The bullets DO NOT show! I genuinely wasted hours trying to get the code to work. After scouring through what felt like hundreds of forums, I couldn&#8217;t find anyone that was able to get the code to work in I.E 6/7.</p>
<h4>The Solution</h4>
<p>Fortunately, there is a solution. It&#8217;s not a hack, it&#8217;s just a different way of achieving the same visual effect. Instead of using the &#8220;list-style-type&#8221; property, you can use the &#8220;background&#8221; property, and it will give the exact same effect, but it works in the most commonly used browsers: I.E 6/7/8, Safari, Opera, Firefox and Crome (that&#8217;s all I tested).</p>

<div class="wp_codebox"><table><tr id="p2784"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code" id="p278code4"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
li{
background:url(&quot;images/circle.gif&quot;) no-repeat left center;
float:left;
margin:0 0 0 20px;
padding:0 0 0 20px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
&lt;ul&gt;
 &lt;li&gt;List 2&lt;/li&gt;
 &lt;li&gt;List 2&lt;/li&gt;
 &lt;li&gt;List 3&lt;/li&gt;
 &lt;li&gt;List 4&lt;/li&gt;
 &lt;li&gt;List 5&lt;/li&gt;
 &lt;li&gt;List 6&lt;/li&gt;
&lt;/ul&gt;
&nbsp;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>Notice the &#8220;background&#8221; property. The image it is calling is basically the &#8220;circle&#8221;. The bullet can be anything you want it to be &#8211; just create it as an image.</p>
<p>As far as I know, that literally is the ONLY solid way of achieving a stable way of producing item bullets in the majority of browsers.</p>
<p>Has anyone else been pulling their hair out while trying to resolve this bug?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/css-using-float-with-list-item-bullets-in-i-e-67/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Remove Redundant CSS From Your Stylesheet</title>
		<link>http://www.brightcherry.co.uk/scribbles/remove-redundant-css-from-your-stylesheet/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/remove-redundant-css-from-your-stylesheet/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 19:11:03 +0000</pubDate>
		<dc:creator>adm1n</dc:creator>
				<category><![CDATA[CSS Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=139</guid>
		<description><![CDATA[Last week someone approached me with a problem- their website was running significantly slow. There were many obvious problems, but the issue I&#8217;m going to cover today is CSS stylesheets. Believe it or not, but stylesheets can slowdown a website if they get too bloated. It&#8217;s extremely common for a web developer to fill stylesheets [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.brightcherry.co.uk/images/blogimages/css.jpg" title="Remove Redundant CSS" alt="Remove Redundant CSS" /></p>
<p>Last week someone approached me with a problem- their website was running significantly slow. There were many obvious problems, but the issue I&#8217;m going to cover today is CSS stylesheets.</p>
<p>Believe it or not, but stylesheets can slowdown a website if they get too bloated. It&#8217;s extremely common for a web developer to fill stylesheets with unused code. This usually occurs over years of upgrading and maintaining a website- a lot of redundant styling builds up. It also happens when developers first build a website- the trial and error approach of developing usually leaves scars. In this case, CSS code.</p>
<p>The website I worked on had a HUGE stylesheet, and it was definitely one of the factors that helped with the slow loading. In fact, by the time it was uncluttered, the stylesheet had shrunk by more than three-quarters.</p>
<p>To help detect redundant CSS code, refer to this <a href="http://services.immike.net/css-checker/" rel="nofollow" title="Remove Redundant CSS">Remove Redundant CSS Tool</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/remove-redundant-css-from-your-stylesheet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rounded Corners With CSS</title>
		<link>http://www.brightcherry.co.uk/scribbles/rounded-corners-with-css/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/rounded-corners-with-css/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 09:23:08 +0000</pubDate>
		<dc:creator>adm1n</dc:creator>
				<category><![CDATA[CSS Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=69</guid>
		<description><![CDATA[This is a pretty simple but useful tutorial. A lot of people physically create round-edged backgrounds with applications like Photoshop. While this is time-consuming and a complete nightmare for updating purposes, there is a much more efficient way of doing this with the use of CSS. Only problem is that it doesn&#8217;t work in all [...]]]></description>
			<content:encoded><![CDATA[<p>This is a pretty simple but useful tutorial. A lot of people physically create round-edged backgrounds with applications like Photoshop. While this is time-consuming and a complete nightmare for updating purposes, there is a much more efficient way of doing this with the use of CSS. Only problem is that it doesn&#8217;t work in all browsers just yet e.g Internet Explorer <img src='http://www.brightcherry.co.uk/scribbles/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  However, it works with the cool, geeky browsers like Firefox. If anyone knows an I.E fix, holla!</p>
<h4>For example, if you want this image to have rounded edges:</h4>
<div id="nonround">
</div>
<h4>To do the following:</h4>
<div id="round">
</div>
<h4>You can use the following CSS code:</h4>

<div class="wp_codebox"><table><tr id="p696"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code" id="p69code6"><pre class="css" style="font-family:monospace;"> <span style="color: #cc00cc;">#nonround</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#round</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
 -webkit-border-top-left-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -webkit-border-top-right-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -webkit-border-bottom-left-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -webkit-border-bottom-right-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
 -khtml-border-radius-topleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -khtml-border-radius-topright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -khtml-border-radius-bottomleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -khtml-border-radius-bottomright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
 -moz-border-radius-topleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -moz-border-radius-topright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -moz-border-radius-bottomleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -moz-border-radius-bottomright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>(the various rules are somewhat duplicated so they work across various browsers)</p>
<p>Cool, right? Right.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/rounded-corners-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pure CSS Image Gallery</title>
		<link>http://www.brightcherry.co.uk/scribbles/pure-css-image-gallery/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/pure-css-image-gallery/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 07:50:09 +0000</pubDate>
		<dc:creator>adm1n</dc:creator>
				<category><![CDATA[CSS Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=46</guid>
		<description><![CDATA[It&#8217;s a simple CSS image gallery- no Javascript or any other scripting language is required for the feature to work. I had someone ask me how I did it, so I thought I would share the code. Demo of the CSS gallery It&#8217;s simple, clean and affective. CSS Image Gallery Code Download Any probs? Let [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a simple CSS image gallery- no Javascript or any other scripting language is required for the feature to work. I had someone ask me how I did it, so I thought I would share the code.</p>
<h4>Demo of the CSS gallery</h4>
<div id="gallerywrapper" style="width:100%;clear:both;">
<div id="defaultimage">
<img class="mainimage" src="/images/cssgalleryblogpost/image1.jpg" title="Image 1" alt="Image 1" />
</div>
<ul class="gallerydisplay">
<li>
<a href="javascript:void(0);" rel="nofollow"><br />
<img class="thumbnail" src="/images/cssgalleryblogpost/image1.jpg" title="Image 1" alt="Image 1" /><br />
<img class="mainimage" src="/images/cssgalleryblogpost/image1.jpg" title="Image 1" alt="Image 1" /><br />
</a>
</li>
<li>
<a href="javascript:void(0);" rel="nofollow"><br />
<img class="thumbnail" src="/images/cssgalleryblogpost/image2.jpg" title="Image 2" alt="Image 2" /><br />
<img class="mainimage" src="/images/cssgalleryblogpost/image2.jpg" title="Image 2" alt="Image 2" /></p>
<p></a>
</li>
</ul>
</div>
<p>It&#8217;s simple, clean and affective.</p>
<h4>CSS Image Gallery Code</h4>
<p><a href="http://www.brightcherry.co.uk/downloads/css_image_gallery.zip" title="CSS Image Gallery Code">Download</a></p>
<p>Any probs? Let me know. I&#8217;m not offering full-support on this feature, but if you have any queries, i&#8217;ll do my best to assist.</p>
<h4>Note</h4>
<p>The images DO NOT hold when you focus on a thumbnail using WebKit based browsers such as Google Chrome and Safari. In this case, the larger images display only on hover.</p>
<p>However, the large images do hold in other browsers such as Internet Explorer and Firefox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/pure-css-image-gallery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Centering Text Vertically With CSS</title>
		<link>http://www.brightcherry.co.uk/scribbles/centering-text-vertically-with-css/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/centering-text-vertically-with-css/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 22:37:39 +0000</pubDate>
		<dc:creator>adm1n</dc:creator>
				<category><![CDATA[CSS Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=30</guid>
		<description><![CDATA[CSS can be extremely odd some times, and vertically centralizing text in CSS is one of those occasions which makes me think that&#8230; Centering text horizontally within a div is extremely straight forward. All you need to to do is use the text-align:center property. But for some reason, there isn&#8217;t an easy remedy to centralize [...]]]></description>
			<content:encoded><![CDATA[<p>CSS can be extremely odd some times, and vertically centralizing text in CSS is one of those occasions which makes me think that&#8230;</p>
<p>Centering text horizontally within a div is extremely straight forward. All you need to to do is use the <strong class="pink">text-align:center</strong> property. But for some reason, there isn&#8217;t an easy remedy to centralize text vertically with CSS. It&#8217;s easily accomplished with tables, but as web development has progressed, the use of tables is now frowned upon by the web geeks (unless you&#8217;re displaying tabular data).</p>
<p>Admittedly, aligning text vertically central is not a feature I require a lot of the times, but I do need it now and then. For instance, I needed it this morning&#8230;</p>
<h4>Example for centering text vertically</h4>
<p>Below is an image of a navigation bar. I&#8217;ve added the border just for visual ease (it&#8217;s not part of the design). Ideally, i&#8217;d like the <strong>&#8220;360-degree feedback&#8221;</strong> link vertically central with in its container, so it&#8217;s not floating at the top, touching the border.</p>
<p><img title="Centering Text Vertically With CSS" src="http://www.brightcherry.co.uk/images/blogimages/cssverticalwrong.jpg" alt="Centering Text Vertically With CSS" /></p>
<p>Like this&#8230;</p>
<p><img title="Centering Text Vertically With CSS" src="http://www.brightcherry.co.uk/images/blogimages/cssvertical.jpg" alt="Centering Text Vertically With CSS" /></p>
<h4>The Solution</h4>
<p>Here&#8217;s the code I used- I&#8217;ve tested it in I.E 6/7 and Firefox 2/3.</p>
<pre lang="css" line="1" colla="+">
<p>/* dark blue ---*/</p>
<p>#contentleft_btnsdarkblue{<br />
background:url('images/button4.jpg') left no-repeat;<br />
padding-left:35px;<br />
height:60px;<br />
display: table;<br />
#position: relative;<br />
overflow: hidden;<br />
}</p>
<p>#contentleft_btnsdarkblue a{<br />
color:#004064;<br />
}</p>
<p>/* light blue ---*/</p>
<p>#contentleft_btnslightblue{<br />
background:url('images/button1.jpg') left no-repeat;<br />
padding-left:35px;<br />
height:60px;<br />
display: table;<br />
#position: relative;<br />
overflow: hidden;<br />
width:160px;<br />
}</p>
<p>#contentleft_btnslightblue a{<br />
color:#009FE0;<br />
}</p>
<p>.contentleft_btntxt{<br />
#position: relative;<br />
#top: -50%<br />
}</p>
<p>.contentleft_vertical{<br />
#position: absolute;<br />
#top: 50%;display:<br />
table-cell;<br />
vertical-align: middle;<br />
width:160px;<br />
}</p>
<div id="contentleft_btnsdarkblue">
<div class="contentleft_vertical">
<div class="contentleft_btntxt">
<a href="#" title="360-degree feedback">360-degree feedback</a>
</div>
</div>
</div>
<div id="contentleft_btnslightblue">
<div class="contentleft_vertical">
<div class="contentleft_btntxt">
<a href="#" title="Personal Impact Assessment">Personal Impact Assessment</a>
</div>
</div>
</div>
<p>[/pre]</p>
<p>For ease, you can download the <a title="Centering Text Vertically With CSS" href="http://www.brightcherry.co.uk/downloads/css-vertically-align.zip">Centering Text Vertically With CSS</a> code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/centering-text-vertically-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

