<?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>Acroidea &#187; CSS</title>
	<atom:link href="http://www.acroidea.com/index.php/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acroidea.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 09:31:09 +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>Background Images and CSS in HTML Email</title>
		<link>http://www.acroidea.com/index.php/2009/05/28/background-images-and-css-in-html-email/</link>
		<comments>http://www.acroidea.com/index.php/2009/05/28/background-images-and-css-in-html-email/#comments</comments>
		<pubDate>Thu, 28 May 2009 04:33:56 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.acroidea.com/?p=180</guid>
		<description><![CDATA[http://www.mailchimp.com/blog/background-images-and-css-in-html-email/ We’ve noticed a few people having issues with background images in their HTML email designs, so we thought we’d...]]></description>
			<content:encoded><![CDATA[<p>http://www.mailchimp.com/blog/background-images-and-css-in-html-email/</p>
<p>We’ve noticed a few people having issues with background images in their HTML email designs, so we thought we’d post some quick tips here.</p>
<p>Lots of email applications (especially the browser-based ones, like Yahoo!Mail, Hotmail and Gmail) strip out your <html>, <head> and <body> tags. It kinda makes sense, if you think about it. They’re displaying your email inside their web page. They don’t want your page settings (like background colors, files, CSS, etc) to interfere with their overall interface. So they strip it all out.</p>
<p>That means you’ll kinda have to rig your HTML email to make certain things work…</p>
<p>Background Images and colors in HTML Email</p>
<p>If you want to set a background image or color in your HTML email, you can set it in your BODY tag, where it usually goes. That’ll work ok for some desktop email applications, like Microsoft Outlook.</p>
<p>But to make it work across more email applications, you need to “rig” your code so that your entire email is set inside a big TABLE WRAP. Just set a big table that’s 100% wide, then specify your background color and image there. We recommend doing it the old-fashioned “bgcolor” or “background=”&#8221; way. If you prefer doing it with CSS, be sure to read the “CSS” tips below. As with all images in HTML email, they need to be hosted on your server, and you need to point to them with absolute (not relative) paths.</p>
<p>Once you’ve created the big TABLE WRAP with your background color or image, place your actual newsletter code inside, and you’re good to go.</p>
<p>If you’re a very experienced web designer, this will no doubt make you feel dirty, and make you want to take a shower immediately afterwards. But HTML email isn’t as reliable as web pages are (yet) and there are way too many email apps out there that display HTML differently. Until all the various email apps get a little more consistent, you’re going to have to get used to “rigs” like this.<br />
CSS in HTML Email</p>
<p>There are all sorts of “CSS tips and tricks for HTML email.” But the main thing to remember is that the <head> and <body> tags get stripped when HTML email is displayed in browser based applications. So that means you can’t link to an external CSS file from the <head> portion of your email. You’ll need to use embedded or inline CSS in HTML email instead. And, if you take the embedded approach, be sure to place all your code BELOW the <body> tag. Place it just above your content. Feels dirty, I know. But it’s the only way to get CSS to work (reliably) in email.</p>
<p>Periods = “Stop Email!”<br />
If you start any line in your email with a “period,” some email servers interpret that as “end of message” and they’ll stop it right there. D’oh! So this affects how you need to code your CSS. When you embed your CSS, be careful with the little “dots” or “periods” that are used to define styles. If you start your line of CSS with “.header” for instance, that’s exactly where some email servers will cut your message off. So in your CSS, add a space before every single line that starts with a period.</p>
<p>It’s not just a CSS thing. It’s any line that starts with a period (see our previous post). But the CSS portion of your email is more likely to have lines that start with periods, so it’s good to mention it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acroidea.com/index.php/2009/05/28/background-images-and-css-in-html-email/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>css实现自定义图片的滚动条</title>
		<link>http://www.acroidea.com/index.php/2009/05/16/css-custom-scrollbar-image/</link>
		<comments>http://www.acroidea.com/index.php/2009/05/16/css-custom-scrollbar-image/#comments</comments>
		<pubDate>Sat, 16 May 2009 11:12:19 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.acroidea.com/?p=178</guid>
		<description><![CDATA[http://www.hesido.com/web.php?page=customscrollbar]]></description>
			<content:encoded><![CDATA[<p>http://www.hesido.com/web.php?page=customscrollbar</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acroidea.com/index.php/2009/05/16/css-custom-scrollbar-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML版本引起的object标签显示问题</title>
		<link>http://www.acroidea.com/index.php/2009/04/06/html-version-object/</link>
		<comments>http://www.acroidea.com/index.php/2009/04/06/html-version-object/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 13:31:29 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[SWF]]></category>

		<guid isPermaLink="false">http://www.acroidea.com/?p=169</guid>
		<description><![CDATA[CSS部分： body { margin: 0px; padding: 0px; } object { margin: 0px; padding: 0px; } table, tr, td { padding:...]]></description>
			<content:encoded><![CDATA[<p>CSS部分：</p>
<p>body<br />
{<br />
margin: 0px;<br />
padding: 0px;<br />
}<br />
object<br />
{<br />
margin: 0px;<br />
padding: 0px;<br />
}<br />
table, tr, td<br />
{<br />
padding: 0px;<br />
margin: 0px;<br />
border: 0px;<br />
}<br />
iframe<br />
{<br />
margin: 0px;<br />
padding: 0px;<br />
}<br />
#body.day<br />
{<br />
background: #F0FF00;<br />
}<br />
#body.night<br />
{<br />
background: #000000 url(&#8220;images/night_Scene_body.jpg&#8221;) repeat;<br />
}</p>
<p>BODY的内容：</p>
<p>&lt;table style=&#8221;background-color: Black;&#8221; border=&#8221;0&#8243; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243;<br />
width=&#8221;100%&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;<br />
&lt;object style=&#8221;visibility: visible;&#8221; id=&#8221;bg_left&#8221; data=&#8221;night_WhoScene_bg_side.swf&#8221;<br />
type=&#8221;application/x-shockwave-flash&#8221; height=&#8221;600&#8243; width=&#8221;100&#8243;&gt;<br />
&lt;param value=&#8221;exactfit&#8221; name=&#8221;scale&#8221;/&gt;<br />
&lt;param value=&#8221;window&#8221; name=&#8221;wmode&#8221;/&gt;<br />
&lt;param value=&#8221;false&#8221; name=&#8221;allowfullscreen&#8221;/&gt;<br />
&lt;/object&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;&lt;div&gt;<br />
&lt;object style=&#8221;visibility: visible;&#8221; id=&#8221;bg_bottom&#8221; data=&#8221;night_WhoScene_bg_bottom.swf&#8221;<br />
type=&#8221;application/x-shockwave-flash&#8221; height=&#8221;40&#8243; width=&#8221;1280&#8243;&gt;<br />
&lt;param value=&#8221;exactfit&#8221; name=&#8221;scale&#8221;/&gt;<br />
&lt;param value=&#8221;window&#8221; name=&#8221;wmode&#8221;/&gt;<br />
&lt;param value=&#8221;false&#8221; name=&#8221;allowfullscreen&#8221;/&gt;<br />
&lt;/object&gt;&lt;/div&gt;</p>
<p>对于IE7，显示时上面一个swf跟下面一个中间是没有间隙的，而对于ie8,firefox3,chrome1，显示时，两个flash中间都出现的间隙，整了一整天，也不知道为什么，最后发现在将html头部的</p>
<p>&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;改成</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>问题竟然解决了，晕哦，但是要真想在 XHTML 1.0 Strict 下正常显示中间无缝隙该怎么做呢？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acroidea.com/index.php/2009/04/06/html-version-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>div设置float后高度不自动增加</title>
		<link>http://www.acroidea.com/index.php/2008/09/14/div-float-height/</link>
		<comments>http://www.acroidea.com/index.php/2008/09/14/div-float-height/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 09:01:45 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.acroidea.com/?p=145</guid>
		<description><![CDATA[如果您没有闭合(清除)浮动元素，它将造成的后果是&#8212;&#8211;div的高度不能自动增加。 目前用来清除“闭合(清除)浮动”的方法，主要是一下四种： 1.额外标签法 这种方法就是向父容器的末尾再插入一个额外的标签，并令其清除浮动（clear）以撑大父容器。这种方法浏览器兼容性好，没有什么问题，缺点就是需要额外的（而且通常是无语义的）标签。 我个人不喜欢这种方法，但是它确实是W3C推荐的方法 &#60;div style=&#8221;clear:both;&#8221;&#62;&#60;/div&#62; 或者使用 &#60;br style=&#8221;clear:both;&#8221; /&#62; 2.使用after伪类 这种方法就是对父容器使用after伪类和内容声明在指定的现在内容末尾添加新的内容。经常的做法就是添加一个“点”，因为它比较小不太引人注意。然后我们再利用它来清除浮动（闭合浮动元素），并隐藏这个内容。 这种方法兼容性一般，但经过各种 hack 也可以应付不同浏览器了，同时又可以保证html 比较干净，所以用得还是比较多的。 #outer:after{ content:&#8221;.&#8221;; height:0; visibility:hidden; display:block; clear:both;...]]></description>
			<content:encoded><![CDATA[<p>如果您没有闭合(清除)浮动元素，它将造成的后果是&#8212;&#8211;div的高度不能自动增加。</p>
<p>目前用来清除“闭合(清除)浮动”的方法，主要是一下四种：</p>
<p><strong>1.额外标签法</strong></p>
<p>这种方法就是向父容器的末尾再插入一个额外的标签，并令其清除浮动（clear）以撑大父容器。这种方法浏览器兼容性好，没有什么问题，缺点就是需要额外的（而且通常是无语义的）标签。</p>
<p>我个人不喜欢这种方法，但是它确实是W3C推荐的方法</p>
<table style="border: 1px dotted #cccccc; table-layout: fixed;" border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#f3f3f3">&lt;div style=&#8221;clear:both;&#8221;&gt;&lt;/div&gt;</td>
</tr>
</tbody>
</table>
<p>或者使用</p>
<table style="border: 1px dotted #cccccc; table-layout: fixed;" border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#f3f3f3">&lt;br style=&#8221;clear:both;&#8221; /&gt;</td>
</tr>
</tbody>
</table>
<p><strong>2.使用after伪类</strong></p>
<p>这种方法就是对父容器使用after伪类和内容声明在指定的现在内容末尾添加新的内容。经常的做法就是添加一个“点”，因为它比较小不太引人注意。然后我们再利用它来清除浮动（闭合浮动元素），并隐藏这个内容。</p>
<p>这种方法兼容性一般，但经过各种 hack 也可以应付不同浏览器了，同时又可以保证html 比较干净，所以用得还是比较多的。</p>
<table style="border: 1px dotted #cccccc; table-layout: fixed;" border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#f3f3f3">#outer:after{<br />
content:&#8221;.&#8221;;<br />
height:0;<br />
visibility:hidden;<br />
display:block;<br />
clear:both;<br />
}</td>
</tr>
</tbody>
</table>
<p><strong>3.设置overflow为hidden或者auto</strong></p>
<p>这种做法就是将父容器的overflow设为hidden或auto就可以在标准兼容浏览器中闭合浮动元素.</p>
<p>不过使用overflow的时候，可能会对页面表现带来影响，而且这种影响是不确定的，你最好是能在多个浏览器上测试你的页面。</p>
<p><strong>4.浮动外部元素，float-in-float</strong><br />
这种做法就是让父容器也浮动，这利用到了浮动元素的一个特性——浮动元素会闭合浮动元素。这种方式在 IE/Win 和标准兼容浏览器中都有较好的效果，但缺点也很明显——父容器未必想浮动就浮动的了，毕竟浮动是一种比较特殊的行为，有时布局不允许其浮动也很正常。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acroidea.com/index.php/2008/09/14/div-float-height/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
