<?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>Ruby on Rails Notes &#187; css</title> <atom:link href="http://railsnotes.com/tag/css/feed/" rel="self" type="application/rss+xml" /><link>http://railsnotes.com</link> <description>A code-heavy brain dump of stuff I come across working on Ruby on Rails projects including Models, ActiveRecord, Views, Controllers, RESTful rails, deployment, server stuff, etc.</description> <lastBuildDate>Sun, 29 Aug 2010 23:45:16 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>ul CSS trick</title><link>http://railsnotes.com/88-ul-css-trick/</link> <comments>http://railsnotes.com/88-ul-css-trick/#comments</comments> <pubDate>Tue, 10 Feb 2009 22:29:07 +0000</pubDate> <dc:creator>Melvin Ram</dc:creator> <category><![CDATA[views]]></category> <category><![CDATA[css]]></category><guid
isPermaLink="false">http://railsnotes.wordpress.com/?p=88</guid> <description><![CDATA[I had a problem. I had an image that I had floating to the left. Right next to it, I had content. Here&#8217;s what the code looked like: 1 &#60;img style="float:left" src="cover.gif" alt="" /&#62; 2 blah blah blah blah blah blah blah 3 &#60;ul&#62; 4 &#60;li&#62;Item 1&#60;/li&#62; 5 &#60;li&#62;Item 2&#60;/li&#62; 6 &#60;li&#62;Item 3&#60;/li&#62; 7 &#60;/ul&#62; [...]]]></description> <content:encoded><![CDATA[<p></p><p>I had a problem. I had an image that I had floating to the left. Right next to it, I had content. Here&#8217;s what the code looked like:</p><pre><span class='linenum'>    1</span> <span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">&lt;img style="float:left" src="cover.gif" alt="" /&gt;
<span class='linenum'>    2</span> blah blah blah blah blah blah blah
<span class='linenum'>    3</span> &lt;ul&gt;
</span><span class='linenum'>    4</span>   <span class="meta meta_paragraph meta_paragraph_text">&lt;li&gt;Item 1&lt;/li&gt;
<span class='linenum'>    5</span>   &lt;li&gt;Item 2&lt;/li&gt;
<span class='linenum'>    6</span>   &lt;li&gt;Item 3&lt;/li&gt;
<span class='linenum'>    7</span> &lt;/ul&gt;</span></span></pre><p>Simple enough, right? It should just work, right? Wrong!</p><p>When viewed in a browser, the above code will screw up your list. What do I mean by &#8220;screw up&#8221; the list? Here&#8217;s a  screenshot to demonstrate:</p><p><img
class="alignnone size-full wp-image-89" src="http://railsnotes.files.wordpress.com/2009/02/floating-image-w_-ul-problem.jpg" alt="floating-image-w_-ul-problem" width="304" height="356" /></p><p>Notice, the bullet points will actually overlap with the image. Ugly! I tried adding margins, padding and a bunch of diff things to both the image and the ul element. Nothing fixed it!</p><p>I started hunting on Google and I ran into this page: <a
href="http://www.webmasterworld.com/css/3697078.htm" target="_blank">http://www.webmasterworld.com/css/3697078.htm</a></p><p>The fix? Add &#8220;overflow: auto;&#8221; to the ul style. Simple! I love it!</p> ]]></content:encoded> <wfw:commentRss>http://railsnotes.com/88-ul-css-trick/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 4/16 queries in 0.038 seconds using disk

Served from: railsnotes.com @ 2010-09-09 07:24:38 -->