<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - CSS bug or general weirdness?]]></title>
		<link>http://railsforum.com/viewtopic.php?id=30370</link>
		<description><![CDATA[The most recent posts in CSS bug or general weirdness?.]]></description>
		<lastBuildDate>Wed, 29 Sep 2010 05:36:17 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=131412#p131412</link>
			<description><![CDATA[<p>I&#039;ve used the line-height answer in a few places but here I ended up applying another dope above this one delivering the detail consider.</p>]]></description>
			<author><![CDATA[dummy@example.com (cyresjones)]]></author>
			<pubDate>Wed, 29 Sep 2010 05:36:17 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=131412#p131412</guid>
		</item>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=98205#p98205</link>
			<description><![CDATA[<p>I think I misunderstood what you are trying to accomplish. <img src="http://railsforum.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /> At any rate, hopefully you can make it work the way you want. <img src="http://railsforum.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (s.cannon)]]></author>
			<pubDate>Wed, 20 May 2009 14:44:30 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=98205#p98205</guid>
		</item>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=97916#p97916</link>
			<description><![CDATA[<p>Yes, negative numbers would work but I try to avoid those generally, it doesn&#039;t feel like a very clean way to handle things. Your example works but only by virtue of adding padding to the container div, which has the same result as before unfortunately. For now I&#039;ll just hack around it, using padding in the container instead of margin in the content will work. But thanks for looking into it <img src="http://railsforum.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (marsvin)]]></author>
			<pubDate>Mon, 18 May 2009 14:47:49 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=97916#p97916</guid>
		</item>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=97659#p97659</link>
			<description><![CDATA[<p>If I understand what you are trying to do....you just need to specify padding on your container to keep it from moving with the content div. Then use the margin on the content div to place it where you want it. (You can also use negative numbers if necessary.)</p><p>The code below is based off of your example. All you need to do is add a margin and padding rule to the container and content and then play with the numbers to get the look you want.</p><p><pre name="code" class="ruby:nogutter">&lt;html&gt;<br />&nbsp; &nbsp; &lt;head&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;style&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; body {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: #def;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #container {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: #333;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: #fff;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin: 0px;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #content {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: #ccc;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin: 200px 0px;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 5px;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 50%;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/style&gt;<br />&nbsp; &nbsp; &lt;/head&gt;<br />&lt;body&gt;<br />&nbsp; &nbsp; &lt;div id=&quot;container&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;content&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; This is a test<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &lt;/div&gt;</p><p>&lt;/body&gt;<br />&lt;/html&gt;</pre></p>]]></description>
			<author><![CDATA[dummy@example.com (s.cannon)]]></author>
			<pubDate>Fri, 15 May 2009 16:30:43 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=97659#p97659</guid>
		</item>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=97647#p97647</link>
			<description><![CDATA[<p>I&#039;ve since changed the layout quite a bit but here&#039;s a quick example which works (or rather fails) in both Explorer and Firefox:</p><p><pre name="code" class="html:nogutter">&lt;html&gt;<br />&nbsp; &lt;head&gt;<br />&nbsp; &nbsp; &lt;style&gt;<br />&nbsp; &nbsp; &nbsp; body {<br />&nbsp; &nbsp; &nbsp; &nbsp; background: #def;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; .container {<br />&nbsp; &nbsp; &nbsp; &nbsp; background: #fff;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; .content {<br />&nbsp; &nbsp; &nbsp; &nbsp; margin: 5px 0px;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; .padded {<br />&nbsp; &nbsp; &nbsp; &nbsp; padding: 1px 0px;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &lt;/style&gt;<br />&nbsp; &lt;/head&gt;<br />&nbsp; &lt;body&gt;<br />&nbsp; &nbsp; &lt;div class=&#039;container&#039;&gt;<br />&nbsp; &nbsp; &nbsp; &lt;div class=&#039;content&#039;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; This is a test<br />&nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &lt;div class=&#039;container padded&#039;&gt;<br />&nbsp; &nbsp; &nbsp; &lt;div class=&#039;content&#039;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; This is a test<br />&nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &lt;/body&gt;<br />&lt;/html&gt;</pre><br />The first div shows the result without padding of the container the second shows that when 1px of padding is added the margin is suddenly inserted properly.</p>]]></description>
			<author><![CDATA[dummy@example.com (marsvin)]]></author>
			<pubDate>Fri, 15 May 2009 15:23:58 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=97647#p97647</guid>
		</item>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=97620#p97620</link>
			<description><![CDATA[<p>can you pastie your css and the relevent html.erb code please?</p>]]></description>
			<author><![CDATA[dummy@example.com (dweebazoid)]]></author>
			<pubDate>Fri, 15 May 2009 08:36:36 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=97620#p97620</guid>
		</item>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=97456#p97456</link>
			<description><![CDATA[<p>I&#039;ve used the line-height solution in a few places but here I ended up using another div above this one rendering the point moot. So far I haven&#039;t had too many problems in other browsers mostly because I use CSS as little as humanly possible and don&#039;t try to do anything too tricky.</p><p>Although usually still end up spending a ton of time fixing little differences in IE/FF/S <img src="http://railsforum.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (marsvin)]]></author>
			<pubDate>Wed, 13 May 2009 22:33:44 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=97456#p97456</guid>
		</item>
		<item>
			<title><![CDATA[Re: CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=97209#p97209</link>
			<description><![CDATA[<p>I already went through that headache, the trick is to use a list, and set the line-height property, it sounds stupid but that&#039;s the only way to properly set a horizontal list vertically and be cross-browser compatible. </p><p>Currently I am sure that your CSS completly blows on various browsers, have you tried?</p>]]></description>
			<author><![CDATA[dummy@example.com (Johnson)]]></author>
			<pubDate>Mon, 11 May 2009 19:09:28 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=97209#p97209</guid>
		</item>
		<item>
			<title><![CDATA[CSS bug or general weirdness?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=97203#p97203</link>
			<description><![CDATA[<p>Hey guys,</p><p>I have a container with padding 0px and background #fff. Inside the container is a div with padding 0px and margin 5px. I would expect the inside div to be displayed 5px from the top of the container, but it&#039;s not. Here&#039;s what firebug shows:</p><p><span class="postimg"><img src="http://maggie.commuun.nl/~peter/rails/padding.gif" alt="http://maggie.commuun.nl/~peter/rails/padding.gif" /></span></p><p>As you can see the margin spils outside the container div (which is the white)</p><p>If I give the container a vertical padding, even 1px, the margin is displayed correctly but I end up with the extra padding which I don&#039;t want:</p><p><span class="postimg"><img src="http://maggie.commuun.nl/~peter/rails/padding2.gif" alt="http://maggie.commuun.nl/~peter/rails/padding2.gif" /></span></p><p>This doesn&#039;t make any sense to me. Is this a bug or is it deliberate?</p>]]></description>
			<author><![CDATA[dummy@example.com (marsvin)]]></author>
			<pubDate>Mon, 11 May 2009 18:11:29 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=97203#p97203</guid>
		</item>
	</channel>
</rss>
